The Scottish government has formally asked the UK Prime Minister Theresa May for a second referendum on independence, deepening a crisis sparked by the Brexit vote.

Scotland’s First Minister Nicola Sturgeon made the request in a letter to May on Friday, two days after the UK triggered Article 50 of the Lisbon Treaty which starts Britain's formal withdrawal from the European Union.

Sturgeon requested an independence referendum for late 2018 or early 2019, once the terms of Britain's exit from the EU had become clearer.

"The people of Scotland must have the right to choose our own future ... our right of self-determination," Sturgeon said in the letter.

She added that the voices of devolved administrations "were largely ignored", adding that "all attempts at compromise" had been "rejected in most cases with no prior consultation.

"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," she added.

READ MORE: How would Scotland vote in second referendum?

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.

The June 23, 2016 Brexit referendum vote brought the United Kingdom's future into question as England and Wales voted to leave the EU while Scotland and Northern Ireland voted to stay.

About 51.9 percent of the electorate, 17.4 million people, voted "leave", while 48.1 percent, or 16.1 million people, voted "remain".

Some 62 percent of Scottish voters were in favour of remaining in the EU.

OPINION: If Scotland leaves, England will lose the Brexit game

On Tuesday, the Scottish parliament voted by 69 votes to 59 for the second referendum, but the UK government in Westminster must give its approval before any such poll can be held.

May has previously said it is "not the right time" for another vote, having only just started the complex two-year divorce talks between the UK and its 27 EU partners.

Sturgeon has already indicated she will take unspecified "steps" for holding a referendum in case her request for one is ignored.

"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," she wrote in the letter.

Scotland rejected independence by 55 to 45 percent in a September 2014 referendum, though the vote energised Scottish politics and support for the Scottish National Party has surged since then.