Brussels: The leaders of the 27 remaining EU member-states and UK Prime Minister Theresa May agreed here early Thursday to extend Brexit deadline until October 31.

“EU27/UK have agreed a flexible extension until 31 October. This means additional six months for the UK to find the best possible solution,” Efe news quoted European Council President Donald Tusk as saying on Twitter.

The arrangement calls for an interim review of the situation in late June, which would allow for an earlier Brexit if conditions warranted.

UK Prime Minister Theresa May had requested a delay until June 30 to allow time for a withdrawal deal to be approved by Parliament, which has rejected her Brexit proposal on three occasions.

The inclusion of a mid-point status review leaves open the possibility that the UK can be out of the EU well before Oct. 31.

EU heads of government gathered in Brussels on Wednesday for an emergency summit to consider the appeal from May ahead of the existing Brexit deadline of April 12.

The original Brexit date, enshrined in UK law, was March 29, but with Parliament unwilling to endorse the withdrawal agreement, May sought and obtained late last month a dual-option delay.

London was given the option to delay Brexit until May 22, provided the House of Commons approved the agreement. Absent that approval, the UK would have until April 12 to propose a way forward or leave without a deal.

May, who leads a minority Conservative government that depends for survival on its alliance with the right-wing Democratic Unionist Party of Northern Ireland, entered talks with the main opposition Labor Party in hopes of getting her deal through the House.

Headed into the conference of the EU27, France was seen as the most reluctant to grant any extension beyond the June 30 date requested by May.

Tusk, however, had mused publicly about a delay of as much as a year.

The UK “should have left the EU by now,” May told reporters Wednesday when she arrived in Brussels for talks with the 27 heads of government.

She added, however, that the UK needed more time to leave the bloc in a “smooth and orderly way.”

Britons voted by a margin of 52 percent to 48 percent to leave the EU in a June 2016 referendum.