Theresa May will return to the UK later 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.
A debate on the deal has been scheduled for Monday but Downing Street said no date has yet been fixed for a vote.
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.”
BBC political editor Laura Kuenssberg said Mrs May, although she did not apologise, had shown a “very different tone to MPs”.
But she added that the PM was not drawn on what she would do if her deal fails again in the vote next week.
UK is a ‘sick patient’
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.
BBC Europe reporter Gavin Lee said that one EU source inside the room told him that some leaders felt she was “obfuscating”.
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.
‘All options remain on the table’
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.
But a long extension is only possible if the UK agrees to stand in the European elections, he said.
Meanwhile, if Mrs May’s deal is agreed next week, the date of Brexit will be on 22 May, to allow enough time to ratify it.
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.
Analysis: Dates have changed, maths hasn’t
By BBC political correspondent Chris Mason
Postponing a series of dilemmas is not the same as resolving them.
And while the dates might have changed, the maths hasn’t – or at least, not by anywhere near enough for the prime minister to get the withdrawal agreement through the Commons.
Little wonder she sought repeatedly last night to pacify rather than alienate MPs.
After a series of breakfast meetings in Brussels this morning, Theresa May will return home to a series of huge questions.
Could more Conservative MPs demand that she resigns?
When, precisely, should Mrs May stage her third attempt at getting her deal approved? Will the Speaker allow it?
And, if her deal is thrown out again, should she seek to steer Parliament towards suggesting an alternative – binding her, potentially, to advocating a plan she’d spent years rejecting? Or outsource the decision entirely to MPs, rendering her close to powerless?
There are no easy answers.
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.