Media playback is unsupported on your device Media caption Brexit: Theresa May says agreement is "important step" on the road to Brexit

EU leaders have agreed to move Brexit talks on to the second phase but called for "further clarity" from the UK about the future relationship it wants.

The first issue to be discussed, early next year, will be the details of an expected two-year transition period after the UK's exit in March 2019.

Talks on trade and security co-operation are set to follow in March.

Theresa May hailed an "important step" on the road but Germany's Angela Merkel said it would get "even tougher".

Donald Tusk, the president of the European Council, broke the news that the 27 EU leaders were happy to move on to phase two after they met in Brussels.

He congratulated Mrs May on reaching this stage and said the EU would begin internal preparations for the next phase right now as well as "exploratory contacts with the UK to get more clarity on their vision".

While securing a deal in time for the UK's exit in March 2019 was realistic, he suggested that the next phase would be "more challenging and more demanding".

Mrs May said the two sides would begin discussions on future relations straight away and hoped for "rapid progress" on a transitional phase to "give certainty" to business.

"This is an important step on the road to delivering the smooth and orderly Brexit that people voted for in June 2016," she said.

"The UK and EU have shown what can be achieved with commitment and perseverance on both sides."

Labour's international trade spokesman, Barry Gardiner, welcomed the move forward, but said it would be a "real problem" for business if the EU didn't start talking trade for a further three months.

He also said his party would not put a time limit on a post-Brexit transition phase, as the expected two-year period would be "extremely tight".

Image copyright Reuters Image caption Emmanuel Macron and Angela Merkel held a joint news conference at the end of the summit

The EU has published its guidelines for phase two of the negotiations, with discussions on future economic co-operation not likely to begin until March.

The three-page document says the UK will remain under the jurisdiction of the European Court of Justice and be required to permit freedom of movement during any transition period.

And agreements on the Irish border, the so-called divorce bill and the rights of EU and UK citizens, agreed by Mrs May last Friday, must be "respected in full and translated faithfully into legal terms as quickly as possible".

The document says: "As the UK will continue to participate in the customs union and the single market during the transition, it will have to continue to comply with EU trade policy."

While the EU is willing to engage in "preliminary and preparatory discussions" on trade as part of building a "close partnership" after the UK's departure, this means any formal agreement "can only be finalised and concluded once the UK has become a third country".

Phew for PM

Image copyright Reuters

By the BBC's political editor Laura Kuenssberg

After the six months she has had, Theresa May might be entitled to breathe a sigh of relief, as the European Council officially declared that the first phase of our long goodbye from the European Union is over.

Stand back from the daily dramas and perhaps it was always bound to happen.

Both sides are committed to getting an agreement.

The EU and the UK both want a deal to be done, and while there has, inevitably, been grumpiness on both sides, they have, in the main, dealt with each other in good faith.

The document "calls on the UK to provide further clarity on its position on the framework for the future relationship".

But in a passage added during the past week, it invites the EU's Brexit negotiator Michel Barnier to "continue internal preparatory discussions" on future relations rather than having to wait until March to do so.

Another rebellion headed off?

Image copyright House of Commons Image caption Tory rebels defeated the government on Wednesday

Sources have told the BBC that the government is highly likely to accept an amendment to the EU Withdrawal Bill next week to see off another potential Commons defeat for Theresa May.

Conservative rebels have been concerned about plans to put the Brexit date and time - 11pm on 29 March 2019 - into law.

Backbenchers, including former minister Oliver Letwin, have tabled an amendment, suggesting a change to the legislation.

Ministers are likely to accept their plan, which is a change that some of the potential rebels have been asking for, the BBC understands.

Senior sources are confident they can see off a defeat, after No 10 said there were no plans to take the date out of the bill.

Responding to the reports, Shadow Brexit secretary Sir Keir Starmer wrote on Twitter: "After a car-crash defeat on Brexit vote, rumours that PM will now U-turn on gimmick exit day amendment: forced to get a Tory MP to amend her own amendment before its put to the vote!"

European Commission President Jean-Claude Juncker said the EU's initial priority was to "formalise the agreement" that had already been reached before moving forward, adding "the second phase will be significantly harder and the first was very difficult".

Praising Mrs May as a "tough, smart and polite" negotiator, he said he was "entirely convinced" that the final agreement reached would be approved by the UK and European Parliaments.

Giving his response, French President Emmanuel Macron said that in moving forward the EU had maintained its unity, protected the integrity of the single market and ensured "compliance with our own rules".

Mrs May is set to discuss her vision of the "end state" for the UK outside the EU at a cabinet meeting on Tuesday, having suffered her first Commons Brexit defeat earlier this week.