EU heads of government agreed to push back this Friday's Brexit deadline until 31 October at a meeting of the European Council in Brussels that continued into the early hours of Thursday morning.

European Council president Donald Tusk said the flexible extension would allow an additional six months "for the UK to find the best possible solution".

"In this time, the course of action will be entirely in the UK's hands. It can still ratify the withdrawal agreement, in which case the extension will be terminated," Tusk said.

"It can also reconsider the whole Brexit strategy. That may lead to changes in the political declaration, but not in the withdrawal agreement.

"Until the end of this period, the UK can also have the possibility to revoke Article 50 and cancel Brexit altogether."

Concluding, he added: "Please do not waste this time."

UK view

Speaking close to 3am on Thursday morning, UK prime minister Theresa May said: "I continue to believe we need to leave the EU, with a deal, as soon as possible.

"And, vitally, the EU have agreed that the extension can be terminated when the withdrawal agreement has been ratified — which was my key request of my fellow leaders.

"For example, this means that, if we are able to pass a deal in the first three weeks of May, we will not have to take part in European elections and will officially leave the EU on Saturday 1 June."

She added: "During the course of the extension, the European Council is clear that the UK will continue to hold full membership rights, as well as its obligations."

Taoiseach's comments

Tweeting shortly after the extension was agreed, An Taoiseach Leo Varadkar said the European heads of state would "take stock" of the situation at their regular summit in June.

Earlier, on his way into the meeting, An Taoiseach Leo Varadkar had said he favoured the UK remaining in a long-term customs union with the EU – an option under discussion between the British government and its Labour opposition.

"One thing that I would like to be considered and I know is under consideration is the possibility of a customs union being formed between the UK and the EU," An Taoiseach said.

"In a world of big blocs, it’s in the interest of the UK to be part of one of these blocs. It’s also in our interest to have the UK in our bloc and I think we’ll be generous in negotiating that," he added, suggesting that the UK should not be a "silent partner" and have a say in the decisions of the proposed customs union.

Read more

Colm McCarthy: Brexit's three ultimate outcomes

EU puts UK on safe livestock trading list