LONDON (Reuters) - Scottish First Minister Nicola Sturgeon wrote to Prime Minister Theresa May on Friday formally demanding that she allow a second referendum to be held on Scottish independence ahead of the United Kingdom’s exit from the European Union.

Scotland's First Minister Nicola Sturgeon attends Parliament in Edinburgh, Scotland, Britain March 29, 2017. REUTERS/Russell Cheyne

The results of the June Brexit referendum called the country’s future into question because England and Wales voted to leave the EU but Scotland and Northern Ireland voted to stay.

On Tuesday, Scotland’s devolved parliament voted to hold a referendum on secession in 2018 or 2019, but the UK government in Westminster must give its approval before any such poll can he held.

May has already said it is not the right time for another referendum, having only just formally begun the complex two-year divorce talks between the UK and its 27 EU partners.

Scots rejected independence in a 2014 vote by 55 to 45 percent, but Sturgeon says the situation has changed because of Brexit.

In her letter, Sturgeon said she wished May well in negotiations with the EU, but added it seemed inevitable the outcome would leave the UK outside the European single market

“In these very changed circumstances, the people of Scotland must have the right to choose our own future - in short, to exercise our right of self determination,” she wrote.

“I am therefore writing to begin early discussions between our governments to agree an Order under section 30 of the Scotland Act 1998 that would enable a referendum to be legislated for by the Scottish Parliament.”

Sturgeon said she agreed with May that it would be wrong to hold a referendum immediately but that it should take place after the terms of Brexit were agreed and a future trade deal with the EU was struck, something May envisages before March 2019.

“There appears to be no rational reason for you to stand in the way of the will of the Scottish Parliament and I hope you will not do so,” Sturgeon said.

A spokesman for May said the UK government would respond in due course but ruled out discussions on a second secession vote.

“At this point, all our focus should be on our negotiations with the European Union, making sure we get the right deal for the whole of the UK,” the spokesman said.