The Edinburgh parliament voted by 69 votes in favour and 59 against in a rebuff to British Prime Minister Theresa May.

Scotland’s parliament voted on Tuesday to back First Minister Nicola Sturgeon’s call for a second independence referendum, another headache for Prime Minister Theresa May as she battles to keep the country united just a day before triggering Brexit.

The vote by lawmakers in Edinburgh was 69 in favour and 59 against despite Ms. May’s last-minute appeals.

“I hope the U.K. government will respect the will of this parliament, and if it does so I will enter discussion in good faith and with a willingness to compromise,” Ms. Sturgeon said.

Ms. Sturgeon will now make a formal request for a referendum but she needs approval from the British government and parliament in London to do so and Ms. May has already said that “now is not the time”.

Scotland’s First Minister Nicola Sturgeon arrives to attend the second day of the ‘Scotland’s Choice’ debate on a motion to seek the authority to hold an independence referendum, at the Scottish Parliament in Edinburgh, on Tuesday.

Ms. May will on Wednesday begin the process of ending Britain’s 44-year membership of the European Union by invoking Article 50 of the E.U.’s Lisbon Treaty, opening two years of negotiations.

Last year’s Brexit vote has spurred the independence campaign of Ms. Sturgeon, head of the ruling Scottish National Party (SNP), who argues that Scotland is being forced out of the European bloc against its will.

Both Scotland and Northern Ireland voted to remain in the E.U., but they were outnumbered by voters in England and Wales who backed Brexit.

Most recent polls show support for independence is high but still short of a majority.

A survey by ScotCen published earlier this month showed support at 46% — its highest level since the yearly study began in 1999.

‘U.K. an unstoppable force’

Ms. Sturgeon and Ms. May met in Scotland on Monday, with the Prime Minister reiterating that the time was not ripe for a referendum and describing the four nations of the United Kingdom as an “unstoppable force”.

The SNP leader has suggested an independence vote should be held by spring 2019 at the latest — before Britain leaves the E.U.

Neither leader has expressed a willingness to compromise and the rift is unlikely to end before Article 50 is triggered.

Rejecting Ms. Sturgeon’s request would be politically risky for Ms. May, whose government is also trying to prevent the collapse of the power-sharing arrangement which governs Northern Ireland.

The Northern Ireland executive collapsed in January 2017 following a dispute between the two main parties, the Democratic Unionist Party and Irish nationalists Sinn Fein, which failed to reach a new power-sharing deal by a Monday deadline.

The British government has extended the talks and, if a resolution is not reached, fresh elections could be called or London could resume direct rule over Northern Ireland.

“In the absence of devolved government, it is ultimately for the United Kingdom government to provide for political stability and good governance,” Northern Ireland Minister James Brokenshire told parliament on Tuesday.

The fate of the Province is one of the priorities set by the E.U.’s chief Brexit negotiator. “We will not stand for anything that weakens dialogue and peace in Northern Ireland,” Michel Barnier wrote in the Financial Times on Monday.

‘Pulling together’

Despite Ms. May’s assertion that she will seek the best Brexit deal for all of Britain — including Scotland — she has failed to convince the SNP which has warned of the negative consequences of leaving the E.U.

The economic uncertainty of Scotland outside the United Kingdom was a factor in voters rejecting independence in a 2014 referendum, but the SNP claims breaking away from the European single market would cost Scotland tens of thousands of jobs.

Scotland’s economic hand was strengthened on Monday when exploration firm Hurricane Energy announced the “largest undeveloped discovery” of oil in British waters, located west of the Scottish Shetland Islands.

But Ms. May also won a financial boost, with Qatar committing to invest £5 billion ($6.23 billion) in the U.K. economy within five years.

The announcement will allay fears of investors abandoning Britain when it leaves the E.U. and the European single market, which Ms. May has said is a necessary step to control immigration.

The Prime Minister made a plea for unity ahead of Britain’s historic E.U. departure.

“Now is the time when we should be pulling together, not hanging apart. Pulling together to make sure we get the best possible deal for the whole of the U.K.,” she told reporters.