A junior Wales office minister has quit over the prime minister's decision to turn to Jeremy Corbyn to try to get a Brexit deal through Parliament.
Nigel Adams said the decision was a "grave error" and the UK would now "end in a customs union" with the EU.
Mr Adams, who was also a government whip, said he believed the UK would having coped with a "managed no-deal".
He became the fourth Wales minister to have the job within 1
Theresa May is to meet Mr. Corbyn later to see if they can formulate a deal both sides in Parliament can agree to.
She said that it was not possible to agree, they could choose a series of options to put to the House of Commons.
Wales' First Minister Mark Drakeford will also keep talking with her at Westminster on Wednesday.
He blamed hard Brexiteers in the European Research Group of Conservative MPs who refused to ba ck Mrs May's deal
Mr Corbyn says he wants a customs union and workers' rights to be priorities and that he recognizes his own "responsibility" to break the deadlock.
It comes after the prime minister had more than seven hours of talks with her cabinet on Tuesday.
In his resignation letter, Mr Adams warns Mr May the government risks failing to deliver "the Brexit people voted for" and failing to prevent "the calamity of a Corbyn government".
" previous position that no deal is better than a bad deal, "he says.
" It seems that you and your cabinet have decided that a deal – cooked up with a Marxist who has never entered his political life put British interest first – is better than no deal. "
Cairns Welsh Secretary said he was "disappointed to see Nigel leave government and would like to thank him for all his work and efforts as a minister"
"My department and I are committed to delivering on our priorities, "He said.
Tory MP for Montgomeryshire Glyn Davies praised the MP. "I will miss working with him," he said.
But Labor Welsh assembly member Alun Davies, said it was the resignation "someone no one in Wales has ever heard of"
"Another reason why the Wales Office should be abolished, "he tweeted.
Plaid Cymru Westminster Leader Liz Saville Roberts said the" almost constant churn of Wales Office ministers shows the fundamentally dysfunctional nature of this Westminster government ". Whether the lack of consistency in the Wales Office is the reason why we are so invisible in the minds of the Westminster government, "she added.