EU leaders are becoming increasingly worried about and frustrated with the lack of progress of Brexit negotiations and British prime minister Theresa May's political inability to move her red lines in talks.

This is the message they prepared to give on Friday (29 June), when discussing Brexit on the second day of an EU summit in Brussels.

Student or retired? Then this plan is for you.

"We don't have much longer. I understand it's difficult to come to agreements within the cabinet and the UK parliament, but she [May] has to," Dutch prime minister Mark Rutte said on Thursday.

European leaders want the UK to speed up talks and find a solution to the Irish border issue or risk crashing out from the bloc without a withdrawal agreement or a transitional period.

"The first issue on the table we have to solve is the Irish border, that is crucial, there has to be a backstop that is not temporary," Rutte said, adding: "It's the first, the second, and third priority now to solve the Irish issue."

In an indication of their frustration and concern, the statement that leaders were to adopt calls for preparedness on all outcomes, including a no-deal scenario.

In a gathering were the agenda was topped by divisions over how to handle migration, the departure of the UK was the least controversial point among the EU-27.

Over Thursday's working dinner, May updated her colleagues on the UK's perspective on progress. As customary, no questions were asked.

The prime minister insisted on a common approach to security challenges and warned that the EU's handling of negotiations was not allowing the UK to continue to play a major role in Europe's security.

She maintained that the EU needed to allow a new, innovative construction for the post-Brexit relationship, and not only let the UK choose from different scenarios the EU had previously developed with other third countries.

May also reassured the 27 other leaders that she wanted to accelerate talks.

She said that an upcoming government "white paper" on committing the UK to stay close to the EU's customs union and the single market with regards to goods will be a substantial text, a source said.

"On Brexit I've been stressing that we want a deal that's going to work for the UK and for our European partners and that if we work together we can support each other's prosperity and security," May said upon leaving the talks at around 5AM.

Irish conundrum

May is expected to push her cabinet to adopt the white paper, which remains divisive, probably next week.

European Commission president Jean-Claude Juncker urged the UK to show unity. "We cannot go on living with a split cabinet [in London] … They have to say what they want and we will respond to that," he said ahead of the summit.

Ireland, backed by the EU, had hoped to reach an agreement by this June on how to keep the border between Northern Ireland and the Republic of Ireland open after Brexit.

Dublin is worried that if the border issue is kicked down the road until the next summit in October, when the withdrawal agreement should be finalised to have enough time for the deal's ratification in the European Parliament and the UK, it will get tangled up with other withdrawal issues.

The EU-27 nevertheless remained united.

EU officials warn that in order to avoid a hard border on the island of Ireland - a commitment made by May last December and again in March - the British prime minister needs to move some of her red lines.

It needs to align its customs and standards rules on goods to the EU's.

If those rules would only apply to Northern Ireland that would entail checks between Northern Ireland and the rest of the UK, which the British government interprets as unacceptable interference in its constitutional set-up by the EU.

But aligning the entire UK with EU rules upsets hardline Brexiteer Tories.

"May will have to break one of her promises. Either the promise made to the EU and Ireland on avoiding a hard border, or her promise to the DUP [a Northern Irish unionist party securing a majority for May in parliament] to avoid a border in the Irish Sea, or to her Tories on the UK being able to have its own customs rules," one EU official said.

"In order to be flexible the UK needs to soften some of its red lines, there are things we can't compromise on, like the four freedoms," Irish prime minister Leo Varadkar said ahead of the summit, referring to EU free movement of people, goods, services, and capital.

The EU argues that if some of the single market rules would apply to the UK in order to avoid a hard border on the island of Ireland, the UK would need to recognise the jurisdiction of the EU's top court to settle disputes.

One idea might be, officials say, to have the EU and the UK agree on a separate customs union, rather that the UK remaining in the EU customs union, but that would require the EU to negotiate deals with third parties that it already has trade agreements with.

EU diplomats add that besides the Irish border conundrum, key open issues remain in the withdrawal agreement, such as governance of the accord and data protection.

Not controversial

The UK, under EU withdrawal rules, has the right to ask for the extension of the talks beyond the March 2019 exit date. All 27 need to agree to grant the extension.

An EU official said if member states see that May is fighting for a deal, and negotiating day and night, the 27 would agree to continue talking.

That option only highlights that the UK's position is vulnerable in negotiations, however.

"Any relationship in future between EU and UK isn't going to be one of the absolute equals, we're 27 states, the UK is one. We're 500 million people, the UK is 60 million. That basic fact has to be realised," Varadkar said on Thursday.