Three-layer face coverings will be mandatory on public transport in Wales from 27 July, the first minister has said.
At the daily Welsh Government coronavirus briefing, Mark Drakeford said this would also be the case for taxis and other situations where 2m social distancing was not possible.
Last month, Health Minister Vaughan Gething recommended their use.
But he stopped short of making them mandatory.
Transport for Wales said it had worked with the Welsh Government throughout the pandemic and Great Western Railway said it encouraged all customers to follow the new rule.
The Welsh Conservatives questioned why the measure was not being introduced immediately and Plaid Cymru called for masks to be made mandatory for all indoor spaces.
The union Unite said it warmly welcomed the decision.
Mr Drakeford said: "For the sake of simplicity and consistency, as well as being part of our plan to help reduce the risk of transmission while on public transport where it is not always possible to maintain a two metre physical distance, it will become mandatory for people to wear a three-layer face covering while travelling - this includes taxis."
Face coverings are currently required on public transport in England, Scotland and Northern Ireland, while wearing a face covering in shops and supermarkets in England is to become mandatory from 24 July.
Having a different rule for wearing masks on public transport in Wales and England was "not sustainable in the long term", Mr Drakeford said.
"Our decision to make face coverings mandatory on public transport is a combination of the fact that we know as the economy gets back into operation more people will need to use public transport to go to work and for other purposes, and when more people need to use confined spaces then additional protections need to be introduced in order to overcome the fact that two-metre social distancing will not always be possible," he added.
Taxi driver Stephen Clifford, from Newport, does not believe it will work for customers
He said: "Most of people the customers wouldn't wear them.
"We'd lose an awful lot of money. If you've got to have it, you have got to have it. And what if we had to provide them? It's hard to say."
Asked why coverings were not mandatory in other public spaces, Mr Drakeford said: "The advice of the Welsh Government is that if places are crowded then face coverings are advisory. Where places are not crowded it is a matter for the individual citizen to make that decision."
Coronavirus is now "at its lowest ebb" since the pandemic began, he added, saying the Welsh Government's response had to be "proportionate".
While Mr Drakeford said masks would not be mandatory for shoppers, businesses may ask people to wear them.
He said the retail sector had made "huge efforts" to introduce measures to maintain physical distancing, including putting up one-way systems, limiting the number people who can enter a shop and putting up screens at checkouts.
But, he added: "At this point in time, when the prevalence of coronavirus is low, we are not mandating the use of face coverings in other public places, but many people may choose to wear them - and there is nothing to stop that happening in Wales.
"Our advice may change if cases of coronavirus begin to increase."
The first minister said the Welsh Government had made changes to regulations which recognise there are some occasions when it is not always possible to maintain a distance of 2m.
"These include maintaining hygiene standards and limiting close face-to-face interaction, wherever reasonable," he added.
Mr Drakeford also said 300,000 coronavirus tests have been carried out in Wales, with 17,000 of them positive.
He urged people to carry on following the "golden rules" such as washing hands frequently.
He said there had been a "real change in working patterns, with more people working from home", adding: "We need to see flexible working become a permanent feature of working life in Wales and the Welsh government will lead the way in this."
Reacting to the announcement, Conservative Covid recovery spokesman Darren Millar said: "We must still take every precaution to avoid a second wave of cases, and making wearing face masks mandatory from today may go some way to achieving this - but only if brought in now."
The British Medical Association (BMA) also called for the new rules to be "implemented without delay". It said face coverings should be used whenever people could not keep a safe distance.
Plaid Cymru leader Adam Price welcomed the move but said: "In acknowledging that face coverings make a crucial difference on trains, buses and in taxis, the question must be begged of Welsh Government - why not in shops also?
"The latest guidance, while a step in the right direction, still doesn't go far enough."
Unite Wales regional secretary Peter Hughes said: "This decision will improve safety on our buses, trains and taxis… it will also greatly increase the confidence of the general public to travel on public transport as lockdown measures are eased."