Smoking in school grounds, public playgrounds and at hospital sites will be illegal in Wales from today.
There is a £100 fine for breaking the rules. The laws are aimed at protecting children and vulnerable adults from second-hand smoke.
Wales is the first part of the UK to ban smoking in playgrounds and school grounds. There is speculation the move could pave the way for tighter restrictions in other nations.
Welsh Mental Health Minister Eluned Morgan said: “We are immensely proud to have brought into force this law. It will not only help smokers quit, but will also discourage others from starting.
“We’ve seen the impact of the indoor smoking ban and we hope this will be similarly successful.
"This legislation will benefit the health of future generations in Wales, as fewer children will be exposed to smoking and, we hope, fewer will take it up themselves.
“We need to do everything we can to combat the harmful effects of smoking.”
Premises will be allowed to apply their own rules on e-cigarettes.
Smoking will be outlawed in hotels, guest houses and self-contained holiday lets, such as cottages, by March 2022 in Wales.
There are already restrictions on smoking at hospital sites in Scotland which, in 2006, became the first nation in the UK to ban smoking in pubs and other enclosed public spaces.
Lighting up in pubs was outlawed in the other three nations in 2007.
The ban on smoking in bars, nightclubs and other indoor places has been credited with helping to cut the number of smokers in recent years.