First Minister Mark Drakeford has urged Jeremy Corbyn to “grab with both hands” any chance to have a new Brexit referendum or a general election.
He was speaking after MPs voted to delay giving approval for a new Brexit deal negotiated by Boris Johnson.
The vote meant the prime minister had to send a letter to the EU requesting another extension.
Mr Drakeford said he believed the vote meant options for a second referendum or an election were “still in play”.
The prime minister has insisted he will press ahead with legislation designed to the pass his new deal by the deadline at the end of this month.
Foreign Secretary Dominic Raab said he was confident enough MPs would back the deal next week, and Brexit would still happen by the deadline.
But Kier Starmer, Labour’s shadow Brexit Secretary, told the Andrew Marr Show Labour would support an amendment calling for a referendum in the House of Commons next week.
Mr Drakeford told BBC Wales’ Sunday Politics Wales that an “opportunity to vote on a referendum may now come up first… if that isn’t possible we should have a general election”.
“Both of those things are still in play and really it’s just a matter of timing as to which opportunity comes our way first,” he said.
“Yesterday’s vote, I think, means that a referendum may come our way before a general election, and, if it does, we should grab it with both hands.”
When asked what advice he would give to Labour leader Mr Corbyn, Mr Drakeford replied: “Whichever chance comes your way first, grab it with both hands.”
But the former leader of the Welsh Conservatives in the Welsh Assembly, Andrew RT Davies, urged MPs to back the prime minister’s deal.
He said Wales needed certainty and the result of the 2016 referendum must be respected.
Speaking on BBC Radio Wales’ Sunday Supplement programme, Mr Davies said: “I do hope that people do reflect on the actions in the House yesterday when there is a deal on the table that could have obviously secured our exit on October 31.
“I do hope the parliamentarians get a second chance next week to vote for that deal.”
Mr Drakeford said the planned Brexit deal could have serious implications for Welsh ports due to a customs agreement effectively putting a border in the Irish Sea.
“That will make new demands and new difficulties for us in Holyhead, in Fishguard, in Pembroke Dock,” he said.