British Prime Minister Theresa May has promised to "listen" and work across parties to deliver Brexit after dramatically surviving a no-confidence vote.
The Prime Minister admitted that she had suffered a "significant" rebellion after being backed by a margin of 200 to 117 in a no-confidence ballot
The win staved off what would have been an ignominious end to her time as leader - and means she cannot be challenged by her own party again for 12 months.
But with more than a third of Conservative MPs refusing to support her and a civil war raging over Brexit, the outcome still underlines the scale of the problems she faces.
Speaking at Downing Street after the vote result, a clearly shaken May admitted that she must get an improved deal from the EU.
"I am pleased to have received the backing of my colleagues in tonight's ballot," she said.
"Whilst I'm grateful for that support, significant number of colleagues did cast their vote against me and I have listened to what they have said.
"We now need to get on with the job of delivering for the British people and building a better future for this country."
May added: "That must start here in Westminster with politicians on all sides coming together to act in the national interest."
Just before the vote May revealed she was prepared to bow out as prime minister by not contesting the next general election in 2022 in a move designed to buy her time to complete the Brexit plans.
May had staged a late battle to save her job, her EU divorce bill and maybe even Brexit itself as lawmakers in her Conservative Party held a no-confidence vote on her leadership.
Legislators began casting their secret ballots in a wood-panelled room in Parliament after May's Conservative opponents, who have been circling for weeks, finally got the numbers they needed to force a vote of no confidence.
May had vowed to fight for the leadership of her party and the country "with everything I've got," and spent the day holed up in the House of Commons trying to win over enough lawmakers to secure victory.
"A change of leadership in the Conservative Party now will put our country's future at risk," May said in a defiant statement outside 10 Downing St before the vote.
She said that ousting her and holding a leadership vote — a process that could take weeks — could result in Brexit being delayed or even halted.
Late fight to remain as Prime Minister
May, who spent Tuesday touring European Union capitals to appeal for changes to sweeten her divorce deal for reluctant U.K. lawmakers, has until Jan. 21 to hold a vote on the agreement in Parliament, a timetable that could be scuttled if she is replaced.
In a bid to win over wavering lawmakers, May indicated she would step down before the next election, due in 2022.
Solicitor-General Robert Buckland said May told lawmakers at a meeting that "it is not her intention to lead the party in the 2022 general election."
Another Tory legislator, Nick Boles, tweeted: "She was unambiguous. She will not be leading the Conservative Party into the next election."
May has not said what she will do if, as many expect, there is an early election triggered by Britain's Brexit crisis. The leadership challenge marked a violent eruption of the Conservative Party's decades-long divide over Europe and threw Britain's already rocky path out of the EU, which it is due to leave on March 29, into further chaos.
The no-confidence vote came days after May postponed a vote to approve the divorce deal to avoid all-but-certain defeat.The threat to May has been building as pro-Brexit Conservative lawmakers grew increasingly frustrated with the prime minister's handling of Brexit.
Many supporters of Brexit say May's deal, a compromise that retains close economic ties with the EU, fails to deliver on the clean break with the bloc that they want.Former Environment Secretary Owen Paterson accused May of acting like a "supplicant" in dealings with the EU.
"She's not the person to see Brexit through," he said.
Opposition lawmakers expressed astonishment and outrage at the Conservative civil war erupting in the middle of the fraught Brexit process.
"This government is a farce, the Tory party is in chaos, the prime minister is a disgrace," Scottish National Party leader Ian Blackford said during a pugnacious Prime Minister's Questions session in the House of Commons.
Brexit wavering bad for business
British business figures expressed alarm at the prospect of even more political uncertainty.
"At one of the most pivotal moments for the U.K. economy in decades, it is unacceptable that Westminster politicians have chosen to focus on themselves, rather than on the needs of the country," said Adam Marshall, director general of the British Chambers of Commerce.
Graham Brady, who heads a committee overseeing Conservative leadership contests, announced early Wednesday that he had received letters from at least 48 lawmakers asking for a vote.
That's the 15 percent of Conservative legislators needed to spark a leadership challenge under party rules.
If she loses the vote, May must step down and there will be a contest to choose a new Conservative leader.
She will remain leader, and prime minister, until the successor is picked. That two-stage process, involving votes by lawmakers and party members nationwide, could take weeks.
If May wins, she can't be challenged again for a year, so a decisive victory could strengthen her hand. Allies insisted she would stay in post even if she won by a single vote.
May canceled a Wednesday trip to Dublin to meet Irish Prime Minister Leo Varadkar so she could stay in London and battle for lawmakers' support.
By late afternoon, the number of Conservative lawmakers who had pledged to vote for May passed the 159 votes she needs to win — although nothing is certain in a secret ballot.
The party restored voting rights to two lawmakers who had been suspended for misdeeds, bringing the total to 317 from 315 earlier in the day.
Several leading Brexiteers, including former Foreign Secretary Boris Johnson and ex-Brexit Secretary Dominic Raab, have said loudly that they think they could get a better deal with the EU, and are likely to enter a race to replace her if she loses the vote.But before it, Cabinet colleagues rallied to May's support.
Home Secretary Sajid Javid tweeted that a leadership contest, with Brexit little more than three months away, "will be seen as self-indulgent and wrong."Justice Secretary David Gauke said: "I think it's vital for the country that she wins tonight."He said that if May lost, "I don't think we will be leaving the European Union on the 29th of March."
EU leaders tried to stay out of the fray. There was no change in plans for May to address them about Brexit at a summit on Brussels on Thursday.
The European Parliament's Brexit point man, Guy Verhofstadt, could not contain a note of annoyance, tweeting: "Once again, the fate of EU-U.K. relations, the prosperity of businesses & citizens' rights are consumed by an internal Conservative party catfight over Europe."