Prison smoking ban to begin in 2016
Smoking will be banned in all prisons in Wales and four in south-west England from next year, the government says.
This will begin a phased roll-out that will eventually see all jails in England and Wales go smoke-free.
And from next month, smoking will be barred inside buildings at all "open" prisons in England and Wales.
The Prison Governors Association, which supports the ban, said it would monitor this initial phase to ensure stability and safety were maintained.
A smoke-free policy will be implemented in all prisons in Wales - Cardiff, Parc, Swansea and Usk/Prescoed - from January 2016, and at four English prisons - Exeter, Channings Wood, Dartmoor and Erlestoke - from March 2016.
Smoking is currently allowed only in prison cells and exercise yards, but the government eventually intends to ban smoking in all 136 prisons in England and Wales to reduce health risks.
The move follows a series of legal challenges by prison officers and inmates who have complained about the effects of passive smoking.
By Danny Shaw, home affairs correspondent
Decisions which affect conditions inside prison have to be carefully considered so as not to put stability and security at risk - never more so than with the government's move to make prisons smoke-free, as an estimated 80% of inmates are smokers.
Take away one of the few things that prisoners are legally allowed to do and it could lead to a riot. That's why the Ministry of Justice has adopted a phased approach to the smoking ban, starting with the introduction of e-cigarettes, and have promised support to inmates who give up the habit.
Ministers also hope that by banning smoking in a group of neighbouring jails, it'll make prisoners pining for a cigarette less likely to agitate for a move, as they'd have to travel a long way to find a jail where it's still allowed.
Nevertheless, prison governors and managers will be crossing their fingers when the bans come into effect, hoping there's little unrest.
Prisons Minister Andrew Selous said implementing smoke-free prisons was a "difficult thing to do" given the high prevalence of smoking and the "unique environment" of prisons, but the ban was necessary due to the UK's smoking legislation and for health reasons.
"We have no plans to move to smoke-free prisons overnight and will only do so in a phased way that takes into account operational resilience and readiness of each prison," he said.
"The operational safety and security of our prisons will always be our top priority."
A Prison Service spokeswoman said: "Implementation will be phased over a long period in order to make these changes safely. Prisoners will have access to e-cigarettes and other support to stop smoking."
Other countries, including Canada and New Zealand, had already made this transition successfully, she added.
The Prison Governors Association welcomed the announcement "for a managed approach to the roll-out of smoke-free prisons".
Peter Dawson, from the Prison Reform Trust, said a "sensible approach to smoking in prisons would leave prisoners with a choice - at least to smoke outside".
"If that is to be denied to them, there has to be proper support while people give up - not just smoking cessation aids, but increased vigilance for signs of distress that could easily turn into self-harm or worse," he said.
Frances Crook, chief executive of the Howard League for Penal Reform, said tobacco was an "emotional prop" for inmates, and prisons would have to give them a lot of extra support, such as free patches and extra access to exercise and activities.
The Welsh government had launched a consultation about creating designated smoking cells for a 12-month trial period, and a spokesman said it would keep it open "should there be any delay" in implementing the ban.
The Scottish Prison Service said it aimed to have plans in place by December 2015 on how indoor smoke-free prison facilities would be delivered.
But the Northern Ireland Department of Justice said it had no plans to change the current rules, under which smoking is permitted in prison cells and certain open spaces.