Leaders of the European Union’s remaining 27 member countries agreed to another Brexit extension that will delay the UK’s departure until October 31 at a special EU summit in Brussels on Wednesday.

Such an extension should last only as long as necessary, and in any event, no longer than Oct0ber 31, said a statement released by the EU after marathon closed-door talks.

If the withdrawal agreement is ratified by both parties before this date, the withdrawal will take place on the first day of the following month, said the statement.

The EU underlined that if Britain is still a member of the bloc and if it has not ratified the withdrawal agreement by May 22, it must hold the elections to the European Parliament, otherwise, Brexit will take place on June 1.

President of the European Commission Jean-Claude Juncker warned at a press conference following the special EU summit that the extra time won’t be used for further negotiations. There can be no opening of the withdrawal agreement, he said.

The EU has planned to review the progress of Brexit at its summer summit in June. The summit will not be a negotiation session, Juncker said.

In response, British Prime Minister Theresa May told the press in Brussels that she continues to believe Britain needs to leave the EU with a deal as soon as possible.

European leaders gathered in Brussels on Wednesday for a special summit, ahead of which the British prime minister sent a letter to European Council President Donald Tusk, asking for a further extension of the Article 50 period.