British Prime Minister Theresa May has vowed that she will quit if they back her Brexit agreement in the House of Commons.

“I am prepared to leave this job earlier than I intended in order to do what is right for our country and our party,”said May, who pointed out that she understands that Conservative MPs did not want her to lead the next phase of Brexit negotiations, adding, “and I won’t stand in the way of that”.

May did not name a departure date at a packed meeting of the Conservative Private Members’ Committee.

“We need to get the deal through and deliver Brexit,” May told her MPs. “I ask everyone in this room to back the deal so we can complete our historic duty – to deliver on the decision of the British people and leave the European Union with a smooth and orderly exit.”

After May’s vow to quit her post, former Foreign Secretary Boris Johnson said he will now back the prime minister’s deal. Leading pro-Brexit Tory Jacob Rees-Mogg, who has taken a softer stance on May’s deal in recent days, said there was an “element of sadness” about the prime minister’s announcement “even though it’s something I’ve wanted”.

The Democratic Unionist Party (DUP) may still refuse to end its opposition to the deal. “prime ministers come and go” but the trade and constitutional issues affected by May’s withdrawal agreement would “live on”, DUP sources said.

None of the DUP’s motions will be put to vote, the Speaker of the Commons, John Bercow, told MPs. The first DUP-backed motion was asking for the result of the EU referendum in 2016 to be respected and the other was the Malthouse Compromise, which proposed to reopen the withdrawal agreement with the EU and renegotiate the Irish backstop.