EU students in Scotland will no longer be entitled to free university tuition from 2021.
Higher education minister Richard Lochhead said the decision had been made by the Scottish Government with a “heavy heart” and is “a consequence of Brexit”.
EU laws required students from the bloc to be treated the same as Scottish students, who continue to have their tuition paid for.
But the policy, estimated to cost around £100m a year, will end in the academic year 2021-22 to avoid “the risk of any legal challenge” as a result of EU laws no longer applying in Scotland.
Students from European Union countries who have already begun their university courses in Scotland, or who begin them this coming academic year, will have their tuition covered for the duration of their degrees.
Free tuition for EU students had continued in Scotland ever since the 2016 Brexit vote.
However, Lochhead previously announced 2020-21 would be a “transition year” for the policy, in line with the UK being in its transition period from leaving the EU.
Official figures show more than 21,000 EU students studied at Scottish universities in 2018-19, with around three quarters of them full-time students whose tuition was funded that year.
Addressing MSPs on Thursday, the higher education minister described scrapping the policy as a “difficult” decision.
He insisted the government will work with the sector to build an “ambitious scholarship programme” to ensure European students are still encouraged to come here.
Lochhead said: “As a result of EU law, since this government abolished tuition fees, we have treated EU students in the same way we treat students from Scotland.
“They do not pay tuition fees. It is only as a result of EU law applying in Scotland that this was possible – indeed it was mandatory.
“Our EU law obligations cease at the end of the transition period in a few months, and continuing with this arrangement for 2021-22 would significantly increase the risk of any legal challenge.
“It is therefore with a heavy heart that we have taken the difficult decision to end free education for new EU students from the academic year 2021-2022 onwards as a consequence of Brexit.”
He added: “EU students who have already started their studies, or who start this autumn, will not be affected and will still be tuition free for the entirety of their course.
“That is the stark reality of Brexit and a painful reminder that our country’s decisions are affected by UK policies that we do not support and did not vote for.
“Our internationalism remains a key strength of higher education in Scotland.
“So, we will discuss with the sector an ambitious scholarship programme to ensure that the ancient European nation of Scotland continues to attract significant numbers of European students to study here.”