The UK Government must ensure Scottish universities do not lose out on millions of pounds of funding after Brexit, the SNP has said.

Figures compiled for the party by the House of Commons Library show Scottish institutions had received just under 165 million euro (£142 million) in Horizon 2020 funding for 307 projects as at May this year.

The University of Edinburgh had received more than 64 million euro (£55 million) under the European Union's biggest research and innovation programme, while the University of Glasgow was given more than 35 million euro (£30 million).

READ MORE: The best Scottish universities for getting their students a job

SNP MSP Jenny Gilruth urged the UK Government to go further than its commitment to underwrite funding only for Horizon 2020 projects approved before the UK officially leaves the EU.

She said: "These new figures show just how vital EU funding is to our universities, going some way to helping our higher education sector maintain its reputation as a leader in research and innovation.

"The lack of certainty provided by the Tories puts this reputation on the line, risking the cream of our research talent simply walking away.

"So far, the UK Government has only confirmed that it will underwrite funding received through Horizon 2020 for projects confirmed before the UK leaves the EU - meaning that our universities could lose out on millions of pounds in funding after Brexit.

READ MORE: The best Scottish universities for getting their students a job

"This level of uncertainty simply isn't good enough, and is the last thing our universities need in a competitive environment.

"Given that it is the actions of the Tory Government which has brought this situation about, it would be completely unacceptable for them to simply abdicate responsibility and leave universities to pick up the pieces.

"The fact is that Scotland chose to be part of Europe and to maintain our access to funding sources like Horizon 2020. The UK Government must now give a commitment to ensure that Scotland's universities do not lose out on vital support."

Scottish Labour education spokesman Iain Gray said: "There is no doubt that Brexit poses a threat to the research strength of Scotland's universities, which is critical to our future prosperity.

READ MORE: The best Scottish universities for getting their students a job

"There is also no doubt that this threat is the responsibility of the Tory government who got us into this Brexit mess.

"Ruth Davidson should encourage her Tory colleagues to tell us how they are going to secure the future of our higher education institutions, and quickly."

Ross Greer, education and external affairs spokesman for the Scottish Greens, added: "Earlier this month I raised the threat of Scotland's universities losing over £100 million of funding as a result of Brexit - as I said then, the Scottish and Westminster governments must find a way to guarantee that Scotland's world-class universities will continue to receive the funding they deserve, and not lose out as a result of a decision which Scotland voted overwhelmingly against.

READ MORE: The best Scottish universities for getting their students a job

"We cannot allow our links to the European research community as well as the amazing achievements and jobs that come with it to be undermined by the weak commitments of Tory ministers at Westminster."

A spokesman for the Department for Business, Energy and Industrial Strategy pointed to comments made by Chief Secretary to the Treasury David Gauke earlier this month.

Mr Gauke said: "UK businesses and universities should continue to bid for competitive EU funds while we remain a member of the EU and we will work with the commission to ensure payment when funds are awarded.

"The Treasury will underwrite the payment of such awards, even when specific projects continue beyond the UK's departure from the EU.

"Naturally, we will need to address the future of all programmes that are currently EU-funded, once we have left the EU.

READ MORE: The best Scottish universities for getting their students a job

"Leaving the EU means we will want to take our own decisions about how to deliver the policy objectives previously targeted by EU funding.

"Over the coming months, we will consult closely with stakeholders to review all EU funding schemes in the round, to ensure that any ongoing funding commitments best-serve the UK's national interest, while ensuring appropriate investor certainty."