London (CNN) British Prime Minister Theresa May has launched a scathing attack on Scottish First Minister Nicola Sturgeon's call for a new independence referendum, saying it threatened "huge uncertainty" at a pivotal moment for the United Kingdom.

May accused the Scottish leader of "tunnel vision" and indicated she would not accept Sturgeon's demand for a referendum before 2019, when Britain is expected to leave the European Union.

Sturgeon made her unexpected announcement Monday, hours before the bill authorizing the British government to trigger the formal process of leaving the European Union passed its final stages in the UK parliament . It is expected to receive royal assent -- the signature of the Queen -- later on Tuesday.

The bill was passed after peers in the Hose of Lords backed down over securing residency rights for EU nationals and ensuring a "meaningful vote" on the final Brexit deal.

Speaking earlier in Edinburgh, Sturgeon said the United Kingdom was heading for a "bad deal" on Brexit. Scotland's attempts to strike a compromise were met with a "brick wall," she said.

May hit back at Sturgeon, the Scottish National Party (SNP) leader. "The tunnel vision that SNP has shown today is deeply regrettable," she said.

"Instead of playing politics with the future of our country, the Scottish government should focus on delivering good government and public services for the people of Scotland. Politics is not a game."

What is Royal Assent? What is Royal Assent? After a bill passes both the House of Commons and House of Lords, it requires royal assent to become law. That means that the head of the British monarchy, in this case Queen Elizabeth II, must sign the bill before it becomes an Act of Parliament. Such a process has become a formality in modern times. The last time royal assent was refused was by Queen Anne in 1707.

A spokesman for May added that a referendum in late 2018 or early 2019, as Brexit negotiations reached a climax, would "cause huge economic uncertainty at the worst possible time," the Press Association reported.

May has promised to invoke Article 50 of the Lisbon Treaty, the EU rulebook, by the end of March. That sets a two-year timetable in which Britain must negotiate the terms of its exit with the other 27 member states of the EU.

But Sturgeon's pre-emptive strike caused consternation, plunging the future of the United Kingdom into doubt.

'Defining moment'

Speaking in the Commons Tuesday, May said Britain was facing a "defining moment" as it prepares to leave the EU.

"We remain on track with the timetable I set out six months ago, and I will return to this House before the end of this month to notify when I have formally triggered Article 50 and begun the process through which the UK will leave the European Union," she said.

"This will be a defining moment for our whole country as we begin to forge a new relationship with Europe and a new role for ourselves in the world."

May also claimed that had been "working closely" with the Scottish government during her statement -- a comment that drew jeers from SNP MPs opposite.

Sturgeon strikes first

Speaking in Edinburgh Monday, Sturgeon left no doubt as to the path she wants to pursue to keep Scotland in the European Union.

The First Minister said May had failed to engage with her call for Scotland to remain in the European single market after Brexit, and that Scotland risked being taken out of the EU against its will.

"The language of partnership has gone, completely," she said of the relationship with Downing Street.

"And there should be little doubt about this -- if Scotland can be ignored on an issue as important as our membership of the EU and the single market, then it is clear that our voice and our interests can be ignored at any time and on any issue.

"That cannot be a secure basis on which to build a better Scotland. But it is where we stand today."

In the Brexit referendum, Scotland bucked the UK trend and voted 62% to 38% to remain in the European Union. Sturgeon said it was for Scots to decide whether they followed the rest of the United Kingdom or forged their own path.

"I am ensuring that Scotland's future ... will be decided by the people of Scotland," she told reporters at Bute House, the official residence of the Scottish first minister.

"It will be Scotland's choice and I trust the people of Scotland to make that choice."

Divisive

Before Scotland holds a referendum, the UK government must agree to the vote.

Downing Street on Monday said Sturgeon's announcement was "divisive" and that May would seek a Brexit deal in the interests of the whole United Kingdom.

But while the UK government attacked Sturgeon's proposed timetable, it would be politically difficult to hold off on a demand for a new referendum from the Scottish government indefinitely. In the last referendum, in 2014, Scotland voted 55% to 45% to remain in the United Kingdom. Downing Street said there was no appetite in Scotland for a rerun.

May appears to be determined to hold Sturgeon off for as long as possible. Once Britain leaves the EU, it could take years for Scotland to negotiate re-entry as an independent nation.

John Curtice, professor of politics at the University of Strathclyde in Glasgow, said opinion polling on Scottish independence is close. "Nobody can be sure who would win," he said.

He said the "No" camp has generally held a slight lead over the past year and currently leads 52-48 if undecided voters are excluded, according to opinion polls tracked by the think tank ScotCen.

But polls suggest there are more than enough undecided voters to swing the results either way.