Holyrood has endorsed Nicola Sturgeon’s calls for a second independence referendum, after the First Minister insisted such a vote is “necessary”.

MSPs passed a motion put forward by Ms Sturgeon calling for a referendum to be held “so that the people of Scotland can decide whether they wish it to become an independent country”.

The motion, backed by 64 votes to 54, now calls on the UK Government to “reach an agreement with the Scottish Government on such a referendum taking place on a date and in a manner determined by the Scottish Parliament”.

Prime Minister Boris Johnson has already rejected calls from Ms Sturgeon for Holyrood to be given the powers required to organise such a vote.

But with the UK due to leave the European Union on Friday – something Scots voted against in 2016 – Ms Sturgeon insisted there must now be a fresh ballot.

She has been calling for a referendum to take place in the second half of 2020, and Constitutional Relations Secretary Mike Russell welcomed the “clear endorsement” from MSPs of the Scottish Government’s stance.

He said: “Today we have seen a clear endorsement of the mandate the people have given us: to put the question of Scotland’s future back to them in a new public vote.

“A referendum should now be held so that the people can decide if Scotland should be an independent country.

“We propose that referendum, on a date and in a manner determined by the Scottish Parliament, should take place this year.”

His comments came after the First Minister warned of the consequences for Scotland of both Brexit and a Boris Johnson Government, telling MSPs: “Given what the Tories have in store, proposing a further decision on independence isn’t simply legitimate – it is necessary.”

She accused UK ministers of being “completely deaf to Scotland’s interests, needs and voice”, adding that their vision for the UK is driven by “jingoism and xenophobia”.

Independence, she argued, would give Scotland an alternative future.

First Minister Nicola Sturgeon arrived for the debate with her Constitutional Relations Secretary Mike Russell (Jane Barlow/PA)

The First Minister said: “We stand just two days from losing our EU membership and all of the rights that go with it.

“In my view it is beyond doubt now that the only realistic way for Scotland to return to the heart of Europe and to ensure we get the governments we vote for is to become an independent country.”

She hit out at the Tories, Labour and the Liberal Democrats for their opposition to a second ballot, saying: “It is hard to escape the conclusion that it is their fear of the choice Scotland would make on the substantive question that is driving the anti-democratic position of the opposition parties.

“It is only ever parties that know their arguments are bust that have to resort to blocking democracy.

“I know not everyone agrees with my position on independence, but I am happy to have that debate and let Scotland decide.”

Scottish Conservative interim leader Jackson Carlaw criticised SNP ministers for their focus on independence, saying: “If only this Government spent the same amount of attention on police and schools as it does on polling and spin, we might have the safest streets and the best schools in Europe.”

Labour leader Richard Leonard insisted “nobody in this chamber really believes that there will be a referendum this year”.

And Scottish Liberal Democrat Willie Rennie claimed the SNP had “learned nothing from Brexit”, saying: “Their answer to leaving an economic and social union of 40 years is to leave another closer, more tightly integrated union too.

“While the SNP debate independence, we are seeing health, education and the police struggling to get by. This is the true cost of the SNP’s independence obsession.”

pro-UK campaign group Scotland in Union branded the vote in Holyrood an “attempt to distract from the nationalists’ abysmal record running Scotland’s public services, with hospitals in crisis, targets to close the education attainment gap being missed, and police stations falling apart”.

Chief executive Pamela Nash insisted: “The vast majority of people in Scotland do not want a divisive second independence referendum. Scotland deserves better.”