E-cigarettes ban for under-18s to apply to Wales
Plans to ban under-18s in England from buying electronic cigarettes would also apply to Wales after assembly members agreed to the move.
Experts say it is not known what harm the devices could cause with fears they could damage young people's health.
UK ministers also intend to make it illegal for adults to buy traditional cigarettes for under-18s.
AMs backed a Welsh government motion to allow Westminster legislation bringing in the bans to cover Wales and England.
Experts fear e-cigarettes, used by an estimated 1.3m people in the UK, could be encouraging teenagers to take up smoking.
The battery-powered devices deliver a hit of nicotine and emit water vapour to mimic the feeling and look of smoking.
The vapour is considered potentially less harmful than cigarette smoke and is free of some its damaging substances such as tar.
But Welsh Health Minister Mark Drakeford told AMs that e-cigarettes were a "gateway product" and "we do not want our young people to be able to use them to go on to using something far worse".
"The proposals in front of the assembly today are, I believe, practical, proportionate and, where e-cigarettes are concerned, properly precautionary," he said.
The changes in the law are being introduced in Parliament through an amendment to the Children and Families Bill.
Last month, England's chief medical officer Prof Dame Sally Davies said the harm e-cigarettes could cause adults was not known yet "but we do know they are not risk free".
"E-cigarettes can produce toxic chemicals, and the amount of nicotine and other chemical constituents and contaminants, including vapourised flavourings, varies between products - meaning they could be extremely damaging to young people's health," she said.
The Electronic Cigarette Industry Trade Association said it had been asking for legal changes "for years" and that product labelling made it clear e-cigarettes were not for under-18s.
On Sunday, Mr Drakeford said he feared electronic cigarettes were "re-normalising" smoking and he believed there was a case for tighter laws.
He told BBC Wales' Sunday Politics programme he was "very anxious" about the devices.
But he did not dismiss claims that e-cigarettes may help people quit smoking.