Britain’s Brexit minister Dominic Raab resigned on Thursday in protest at Prime Minister Theresa May’s deal for leaving the European Union.

Prime Minister Theresa May battled on Thursday to save a draft divorce deal with the European Union after her Brexit secretary and other ministers quit in protest at an agreement they say will trap Britain in the bloc’s orbit for years.

May won the backing of her senior ministers for a draft European Union divorce deal on Wednesday, but media reports of the five-hour meeting were clear her team were deeply divided over the proposals.

Just over 12 hours after May announced that her team of top ministers had agreed to the terms of the draft agreement, Brexit minister Dominic Raab and work and pensions minister Esther McVey quit, saying they could not support it.

Their departure and the resignations of two junior ministers shakes May’s divided government. Raab is the second Brexit secretary to quit over May’s plans to leave the EU, the biggest shift in British policy in more than 40 years.

“I regret to say that, following the Cabinet meeting yesterday on the Brexit deal, I must resign,” Raab said in a statement on Twitter.

Raab said May’s plan threatened the integrity of the United Kingdom and he could not support an indefinite backstop arrangement where the EU held a veto over Britain’s ability to exit.

“No democratic nation has ever signed up to be bound by such an extensive regime, imposed externally without any democratic control over the laws to be applied, nor the ability to decide to exit the arrangement,” he said in his resignation letter.