Theresa May still has time to get a Brexit deal through the Commons, First Minister Mark Drakeford has said.
It comes after Plaid Cymru leader Adam Price criticised Labour for not backing a further referendum on the EU outright.
Mr Drakeford said "we're very near" the point a referendum should be called.
Theresa May's Brexit deal failed to pass the House of Commons for a second time on Tuesday evening, in yet another historic defeat.
The comments after Mr Price suggested Mr Drakeford was a "liar or a fool" if he did not think Labour leader Jeremy Corbyn had been deceptive over his support for a further referendum.
The jibe prompted an angry response from Mr Drakeford.
Labour Party leader Jeremy Corbyn has said Labour will back another EU referendum, but Welsh Labour MP, Owen Smith, criticised Mr Corbyn for not making a "full-throated call for a public vote" after Mrs May's loss.
Torfaen Labour AM Lynne Neagle dubbed her party's Brexit position as "ridiculous".
Mr Drakeford told BBC Wales: "The House of Commons has not yet concluded all the debates that it has to have. And there are votes today, there are votes tomorrow, no doubt there will be discussions next week.
"If they run into the sand then we've always said that we will need to go back to the people to have another verdict. But in our verdict there is still room for the prime minister to strike a different deal. That's what senior members in the EU were saying overnight.
"She should make that attempt.
"We're very near the end of that process. But we're not at the very end of it yet. Anybody who's been following the news over the last 25 hours will see that a different sort of deal remains a possibility. A General Election remains a possibility. We're not at the point where those things have completely evaporated."
"The Welsh Government belief is that the UK government should pursue the first of those."
He suggested that a Labour general election manifesto would include a commitment to hold a further referendum on a Brexit deal secured by the party.
Pontypridd MP Owen Smith criticised his UK party leader Jeremy Corbyn for not responding to Theresa May's second loss with a "full-throated call for a public vote, as that's meant to be our policy now".
He accused Mr Corbyn of wanting Brexit. "Always has. We are all being played for fools, I'm afraid," he said.
In the assembly Adam Price asked why the Welsh Government, in a statement on Monday, had not mentioned a further referendum.
But he added: "I think it's pretty clear now that Jeremy Corbyn embrace of a people's vote was a opportunistic act of grand deception.
"And if you don't agree with that first minister, you are either a liar or a fool."
The FM said the Welsh Government believes there is a deal still to be done, with membership of a customs unions and full access to the single market.
In an angry response to Mr Price, he said: "Why does the leader of Plaid Cymru seek to demean those discussions with the sort of remarks that he's made here this afternoon.
"I depreciate them absolutely with every force that I can, he should know better."
The presiding officer Elin Jones told Mr Price that "personal insults are not acceptable in this chamber".
No, I was sat behind you and I heard Jeremy mention a ‘confirmatory vote’. Once. 17 minutes into a 2,500 word speech in which he mainly, misleadingly, called for a ‘Brexit deal to protect jobs’ That’s not what I call ‘campaigning for a People’s Vote’ as agreed at Party Conference https://t.co/oyt8MxFyeZ— Owen Smith (@OwenSmith_MP) March 13, 2019
Labour front-bencher Emily Thornberry responded suggesting Mr Smith was not in the chamber for the speech.
"No," replied Mr Smith. "I was sat behind you and I heard Jeremy mention a 'confirmatory vote'. Once. 17 minutes into a 2,500 word speech in which he mainly, misleadingly, called for a 'Brexit deal to protect jobs'."
"That's not what I call 'campaigning for a People's Vote' as agreed at party conference
In the assembly Labour AM for Torfaen Lynne Neagle attacked members of her own party who support Brexit.
"A pig in lipstick is still a pig," she said, calling "the idea of a jobs-first Brexit equally unconvincing and ridiculous".
Ms Neagle is a supporter of a further referendum.