London (CNN) British and European Union negotiators have agreed on a draft Brexit deal, UK Prime Minister Theresa May's office said Tuesday, more than two years after the country voted in a divisive referendum to withdraw from the bloc.

May has called an emergency Cabinet meeting for Wednesday to discuss the draft deal, her office announced, after months of tortuous negotiations. Marathon talks this week had stretched late into the night.

A Downing Street spokesman said the Cabinet would meet at 2 p.m. Wednesday to "consider the draft agreement the negotiating teams have reached in Brussels, and to decide on next steps. Cabinet ministers have been invited to read documentation ahead of that meeting."

Key ministers were seen entering the Prime Minister's office to be briefed one by one on the text, believed to run over hundreds of pages.

It was a significant moment for May, whose rocky premiership hangs on reaching a Brexit deal. She had hoped to strike a draft agreement by this week to have any chance of getting the deal through the required ratification processes by the time Britain leaves the EU at the end of March.

Read More