The European Union and the U.K. agreed to delay Brexit until Oct. 31, BBC News reports. The agreement was reportedly reached after five hours of talks at an emergency Brexit summit in Brussels early Thursday morning. Irish Prime Minister Leo Varadkar reportedly said Britain must “hold European elections in May” or leave the E.U. in June without a deal. British Prime Minister Theresa May reportedly attended Thursday’s meeting and requested a delay until late June but said she would be willing to extend the date. “The course of action will be entirely in the U.K.’s hands: They can still ratify the withdrawal agreement, in which case the extension can be terminated,” European Council president Donald Tusk told reporters, adding that he thought the U.K. should just “cancel Brexit altogether.” This comes after the British Parliament has repeatedly voted against the exit deal negotiated with the E.U., leading to a “deadlock” in the Brexit process.