Conservative Party MPs have decided the fate of Theresa May.
Theresa May has survived a no confidence vote and will remain prime minister of the UK.
Conservative Party MPs backed the embattled leader 200-117 on Wednesday (UK time).
It leaves Ms May weakened but immune from a further internal challenge for a year.
Speaking after the vote, Ms May said "we need to get on with the job of delivering a Brexit that delivers on the vote".
But she also acknowledged "a significant number of colleagues did cast a vote against me".
Count official MP Graham Brady said "the result of the ballot held this evening is that the parliamentary party does have confidence in Theresa May as leader of the Conservative Party".
But leading Brexit rebel Jacob Rees-Mogg, who helped trigger the vote by writing a letter of no confidence in Ms May, said it was a "terrible result".
"She ought to go and see the queen and resign urgently," he told the BBC.
And Brexit figurehead Nigel Farage tweeted that Ms May "limps on to her next failure, the deal won't pass and the real crisis is close."
The vote was anonymous although some MPs tweeted their ballot papers from inside the Palace of Westminster.
MPs Margot James and Sarah Wollaston tweeted that they were supporting Ms May.
Before the vote, Ms May reportedly told MPs she plans to quit before the 2022 election.
"She said she does not intend to lead the 2022 election," Conservative MP Alec Shelbrooke told journalists after the closed-door meeting.
Cabinet minister Amber Rudd confirmed May's vow not to stand in 2022, as did MP Robert Buckland.
"She said 'in my heart I would like to lead the party into the next election' and then that was the introductory phrase to her indication that she would accept the fact that that would not happen, that is not her intention," Mr Buckland said.
There was some doubt about whether Ms May had unequivocally ruled out leading the party into any snap general election should her government fall before 2022.
But MP Nick Boles said she had been "crystal clear" that she would not lead the party into the next general election.
"She now deserves the support of all Conservative MPs so she can get on with the job of delivering a Brexit compromise that can win a Commons majority," Mr Boles tweeted.
Leading Brexiteer Jacob Rees-Mogg was not convinced by her promise, saying "intention is one of those politicians' dangerous words that one should never rely on."
'Fight with everything I've got'
Ms May on Wednesday vowed to fight "with everything I've got" a bid by her own party to oust her over her unpopular Brexit deal.
The vote was sparked by anti-EU lawmakers in her Conservative Party who want a cleaner break from the other 27 nations when Britain leaves on March 29.
The challenge plunged Britain into its biggest political crisis since Ms May took office after a 2016 referendum triggered the island nation's departure from the European project after 46 years.
Many of her cabinet ministers and senior MPs quickly rallied around her and the pound rose on British media reports that enough had already declared their backing for her to win.
Yet a victory may do little to resolve Ms May's ultimate problem: she is desperately short of the votes needed to get her draft withdrawal deal through parliament and time is quickly running out.
Ms May issued a defiant statement in Downing Street promising to "contest (Wednesday's) vote with everything I've got".
She warned that her ouster would spark a leadership contest that leaves the terms on which Britain pulls away from its main trading partner uncertain for weeks - "delaying or stopping Brexit".
"I stand ready to finish the job," she said.
'Flush out extremists'
Brexit supporters have for months threatened to submit the 48 letters from MPs needed to trigger a confidence vote designed to get a more devout eurosceptic to head the government.
The last batch came in after Ms May - facing a heavy defeat - sparked fury among MPs by delaying a parliamentary vote scheduled for Tuesday on the deal she agreed with the EU last month.
A clutch of senior ministers rallied round in support - including many who might succeed her - within minutes of the vote's announcement.
"The last thing our country needs right now is a Conservative Party leadership election," Home Secretary Sajid Javid said in a tweet designed to play down his own leadership aspirations.
Finance minister Philip Hammond said Ms May's victory would unite the party and "flush out the extremists who are trying to advance a particular agenda which would really not be in the interests of the British people".
Ms May was informed of the challenge after returning late Tuesday from a tour of European capitals in an attempt to salvage her Brexit deal.
She had promised MPs when she delayed the vote that she would seek "assurances" about their concerns on a so-called "backstop" plan to keep open the border with Ireland after Brexit.
Some Conservative MPs and Ms May's Northern Irish allies in the Democratic Unionist Party (DUP) fear a plan for a temporary customs arrangement with the EU will become permanent.
Ms May received sympathy from EU partners on her trip but firm rejections of any attempt to reopen a Brexit deal that was only secured after 17 months of talks.
German Chancellor Angela Merkel said on Wednesday - the day after meeting Ms May in Berlin - that she still "has hope for an orderly exit" but "no intention to change the exit agreement".
"We have little time, but we still have time," the German leader said.
Ms May cancelled a trip to Dublin on Wednesday for talks with Irish Prime Minister Leo Varadkar. She is still expected to attend an EU summit in Brussels on Thursday and Friday.
Down to the wire
Ms May has said the parliamentary vote on Brexit will be held by January 21.
Lawmakers fear it might be delayed even further and a furious opposition Labour leader Jeremy Corbyn accused May of being "contemptuous of parliament".
University of Westminster policy professor Pippa Catterall said it would be in Ms May's interest to delay the vote until the process was "down to the wire... so in the end parliament is faced with the choice: my deal or no deal".
Ms May could face a further no-confidence motion from opposition parties if she survives Wednesday's vote.
A lot will hinge on the DUP and its 10 votes that have been propping up May's government for more than a year.
DUP leader Arlene Foster said on Wednesday she was not "surprised" by the confidence motion but focused on "the fact that the backstop needs to be taken out of that withdrawal agreement".