"If you look ahead, what is going to happen when the UK leaves the European Union is that of course Northern Ireland will have a border with the Republic of Ireland, which will remain a member of the European Union," May said.

She added: "But we've had a common travel area between the UK and the Republic of Ireland many years before either country was a member of the European Union."

May met with Northern Ireland's first and deputy first ministers, Arlene Foster and Martin McGuinness, for talks she described as "very constructive, positive".

The Brexit vote raised concerns over its impact on the peace agreement achieved 18 years ago between Protestant unionists and Catholic nationalists wanting to break away from the UK, along with questions over border controls and the future of EU funding.

May said she wanted the final deal with the EU to be in the best interest of the UK as a whole.

Northern Ireland voted to stay in the EU, with 56 percent of voters casting their ballot for Remain. Its leaders were divided: Foster campaigned for Leave, while McGuinness, a former Irish Republican Army commander campaigned to remain.

McGuinness earlier argued for a referendum to split Northern Ireland from the UK to be able to remain in the EU

"I speak for the people of the North, who are Unionist and Nationalist, and have made it clear that they see their future in Europe ... There is no good news whatsoever in Brexit for anybody in the North," he said after meeting May.