Theresa May will return to the UK on Friday to try and convince MPs to support her withdrawal deal after the EU agreed to postpone Brexit beyond 29 March. On Thursday night, after eight hours of talks, EU leaders offered to delay Brexit until 22 May if MPs approve Mrs May's deal next week.
If they do not approve it, the delay will be shorter - until 12 April - at which point the UK must set out its next steps or leave without a deal. Mrs May said MPs had a clear choice.
Speaking on Thursday, after waiting for the 27 other EU countries to make their decision at a summit in Brussels, the prime minister said she would now be working hard to build support for getting the deal through.
MPs are expected to vote for a third time on the Brexit withdrawal deal next week, despite speaker John Bercow throwing the process into doubt.
Giving a news conference, Mrs May also referred to her speech from Downing Street the previous evening, which sparked an angry reaction from MPs after she blamed them for the Brexit deadlock.
Last night I expressed my frustration and I know that MPs are frustrated too, she said. They have difficult jobs to do. I hope that we can all agree we are now at the moment of decision.
And I will make every effort to ensure that we are able to leave with a deal and move our country forward.
A debate on the deal has been scheduled for Monday but Downing Street said no date has yet been fixed for a vote.
Mrs May arrived at the EU summit in Brussels on Thursday hoping to persuade the EU to postpone Brexit from next Friday - the date which is set in law - to 30 June.
She made her case in a 90-minute presentation to her European counterparts.
Several leaders said they felt surprised that Mrs May appeared to be seriously contemplating a no deal scenario, the source said.
And one leader told Mrs May that the UK was a sick patient that needed special care given the precarious state of Parliament.
Mrs May then left the room, and discussions between EU leaders ran late into the evening. They did not agree to the 30 June date, but granted an extension comprising two possible dates.
In a press conference, European Council President Donald Tusk said that, until 12 April, the deadline by which the UK would have to indicate whether it would stand candidates in the 2019 European Parliament elections, all options remain on the table.
The UK government will still have a chance of a deal, no deal, a long extension or revoking Article 50 until 12 April, he said.
Mr Tusk added that the atmosphere was much better than I had expected among EU leaders in discussions and he was now much more realistic.
Meanwhile, European Commission President Jean-Claude Juncker said the legally-binding reassurances over the controversial backstop part of the withdrawal deal which were agreed in Strasbourg last week have now been endorsed. There is no more than we can give, he added.
In her briefing to journalists, Mrs May dismissed calls to revoke Article 50 - the process by which the UK leaves the EU - which would mean Brexit is cancelled. It comes after a petition calling for Article 50 to be revoked passed two million signatures
Mrs May said people had voted to leave and were told their decision would be respected.
We didn't say, 'tell us what you think and we'll think about it', Mrs May told journalists. We said, 'here's the vote, what is your decision and we will deliver on that'.
The prime minister also said she did not believe the UK should take part in the EU elections, scheduled for 23-26 May, saying it would be wrong to ask Britons to participate three years after voting to leave the EU.