EU leaders have approved guidelines for the negotiation of future relations with the UK after Brexit.

The text on trade, security and other issues was adopted within minutes in Brussels, clearing the way for the next phase of Brexit talks to get under way.

The UK is due to leave in March 2019 and negotiators have said they want a deal in place by the end of the year.

Prime Minister Theresa May said she believed there was a new "spirit of co-operation and opportunity".

The formal adoption of the guidelines, although widely expected, is seen as another key step as the Brexit process gathers momentum.

The guidelines give chief negotiator Michel Barnier the mandate to talk directly to the UK about the future relationship with a view to reaching a broad political agreement by October to allow the EU and UK parliaments time to consider it.

Mrs May, who was not present when her colleagues met to discuss Brexit, said she believed there was a "new dynamic" in the negotiations.

"I believe we are approaching this with a spirit of co-operation, a spirit of opportunity for the future as well, and we will now be sitting down and determining those workable solutions for Northern Ireland, but also for our future security partnership and economic partnership," she said.

"I believe it is in the best interest of both the UK and the EU that we get a deal that actually is in the interests of both."

The remaining 27 leaders have also endorsed an agreement reached earlier this week on a 21-month transition period between March 2019, when the UK officially leaves, and the end of 2020.

During that period, the UK will be able to negotiate, sign and ratify its own trade deals, while EU citizens arriving in the UK will enjoy the same rights and guarantees as those who arrive before Brexit.

A solution to avoid a hard border on the island of Ireland has yet to be agreed, with the EU insisting on a "backstop" option of Northern Ireland effectively remaining in the customs union.

EU Council president Donald Tusk said on Thursday he was "absolutely sure" a solution would be found to prevent the return of physical checks on the border between Northern Ireland and the Republic of Ireland.

Mrs May is now returning to the UK having remained briefly in Brussels for the second day of the EU Council summit to discuss urgent trade issues.

She welcomed the temporary US exemption for EU firms from the 25% tariffs on foreign steel imports coming into effect on Friday.

But she said what was needed was a permanent exemption, given the "huge importance" of the industry to the British economy. "I want to ensure that steel workers and their jobs are properly safeguard."