Boris Johnson is facing a potential parliamentary rebellion after angering both Conservative Remainers and Brexiteers by vowing to push ahead with plans to override key elements of the Brexit withdrawal deal.
Despite a demand by the EU to drop proposed legislation - and an accompanying threat of legal action from Brussels if the UK does not back down - the prime minister is ploughing ahead with the move to alter key elements of the UK's Withdrawal Agreement.
Mr Johnson himself struck the agreement last year before formally signing the deal in January. But he is now seeking, through the UK Internal Market Bill, to empower ministers to set it aside.
The government - which has admitted the bill would break international law if passed - has argued the legislation is "critical" to ensuring the unfettered access for goods from Northern Ireland to the rest of the UK, and to protect the Good Friday Agreement.
But, as well as the fury from European capitals, Mr Johnson has also angered those within his own party ahead of the bill being voted on in the House of Commons.
Unhappy Tory MPs have tabled an amendment to the legislation that would try to block the government from overriding the Withdrawal Agreement without parliament's support.
Sir Bob Neill, who has tabled the amendment with the backing of fellow Tory former ministers Damian Green and Oliver Heald, told Times Radio: "I hope it's at least an indication as a government that really, you need to think very hard and carefully about going down this route.
"For heaven's sake, try and find some other way."
Sir Bob played down the prospect of Tory rebels, who are reported to number up to 30, losing the Tory whip by voting against the government's proposed legislation.
But he signalled he would be ready to be thrown out the Conservative parliamentary party if necessary.
Sir Roger Gale also indicated he is ready to lose the Conservative whip in order to vote against the bill.
"I shall do what I have to do on the basis of principle," he told Sky News.
"And the principle is that this United Kingdom keeps its word internationally."
Last year, Mr Johnson expelled 21 Conservative MPs from the parliamentary party for voting against his Brexit plans.
But it was not just among those Tories who campaigned to Remain in the EU that concerns were being raised about the Internal Market Bill.
Sir Bernard Jenkin, the leader of the European Research Group of Tory eurosceptics, told LBC Radio: "The prime minister should be more mindful of the reputational damage of playing such hardball when there's really no consensus from the country to go about breaking international agreements."
Mr Johnson, who enjoys an 80-strong Commons majority, could also face Tory opposition to his plans in the House of Lords after two senior Conservative peers expressed their displeasure at the prime minister's actions.
Lord Howard of Lympne became the third former Conservative leader - after Sir John Major and Theresa May - to criticise the government's plans.
The Brexit-backing peer accused the government of damaging the UK's "reputation for probity and respect for the rule of the law".
He told the House of Lords: "How can we reproach Russia or China or Iran when their conduct falls below internationally accepted standards, when we are showing such scant regard for our treaty obligations?"
His fellow Brexiteer Lord Lamont, a former chancellor, warned the legislation would not get through the House of Lords unless there were changes.
"The government are in a terrible mess and in a hole and I don't think it is easy to justify," he told BBC Radio 4's PM programme.
"In a way, this could take us back to square one with a terrible dilemma."