Boris Johnson must “obey the law” and request a Brexit extension from the EU, First Minister Mark Drakeford has said.
MPs backed a motion on Saturday by 322 votes to 306 which is aimed at ruling out a no-deal exit.
But the vote also means Mr Johnson has to ask the EU to delay Brexit beyond 31 October, dealing a blow to his plans.
He has said he will press on “undaunted” with his Brexit strategy and a vote on his new Brexit deal could now take place on Monday.
“The PM must now obey the law and request an extension to avoid no-deal,” Mr Drakeford said.
“This is a bad deal for Wales, our economy and jobs.
“The withdrawal agreement bill must be amended so the issue can go back to the people through a referendum. It is in Wales’ best interests to remain in the EU.”
Saturday’s motion, which was tabled by independent MP Sir Oliver Letwin, “withholds approval” for Mr Johnson’s Brexit deal until legislation implementing it has been passed.
All Welsh Labour, Plaid Cymru and Liberal Democrat MPs voted in favour of the motion, as did ex-Conservative and now Independent MP Guto Bebb.
The Tories’ Welsh MPs voted against it, during the first Saturday parliamentary sitting for 37 years.
The defeat is a serious setback for Mr Johnson, who has repeatedly insisted that the UK will leave at the end of the month come what may.
Conservative Brexiteer Monmouth MP David Davies said: “Today we had the opportunity to solve the Brexit debate.
“The Letwin Amendment means yet more delays, and it’s not about preventing a hard Brexit, it’s about preventing Brexit from happening.
“What a disappointment for the 17.4m people who voted Leave and all those others who want to respect the result of a democratic referendum.”
But Labour’s Aberavon MP Stephen Kinnock welcomed the move.
“By passing Letwin amendment Parliament has done all it can to take no-deal off the table by evading the trap the government was trying to set, and has given MPs time and space to analyse and digest withdrawal agreement in full,” he added.
Plaid Cymru MP Liz Saville Roberts said now was the time for a “proper debate and scrutiny” of the deal.
She added: “Parliament have taken a strong stand against Boris Johnson’s catastrophic deal.
“He must now respect the law and seek an extension so that we can put the question back to the people.”
Jane Dodds, leader of the Welsh Liberal Democrats and MP for Brecon and Radnorshire, said: “Today’s vote sends a clear message to the prime minister: we do not want to leave without a deal.
“Mr Johnson must obey the law and request an extension to Article 50.”
Subscribe to the newsletter news
We hate SPAM and promise to keep your email address safe