MSPs have voted 66 to 56 in favour of increasing university tuition fees for students from the rest of the UK, with a higher increase for medical students.
Trainee doctors spoke to MSPs ahead of the debate
Earlier, First Minister Jack McConnell was accused of trying to introduce top-up tuition fees by the back door.
SNP Holyrood leader Nicola Sturgeon made the claim during question time on Thursday, ahead of the vote.
Mr McConnell dismissed the criticism and said Scottish students and NHS patients would benefit.
The increase is designed to address a possible rise in students coming to Scotland when top-up fees are introduced in England in the autumn.
The annual fee for undergraduate courses in Scotland is currently just under £1,200 for students coming from the rest of the UK.
This is to rise to £1,700, while the fee for medical courses is to rise to £2,700.
The Liberal Democrats and Labour voted for it, but Kate MacLean, Labour MSP for Dundee West, abstained.
Ms Sturgeon told MSPs the plan was "the thin end of the wedge", unnecessary, and a breach of a commitment not to introduce top-up fees.
She said the Labour-Liberal Democrat coalition pact had made it clear it would not to support the introduction of top-up tuition fees.
"It could not be clearer - and today that promise is being broken by the introduction of variable top-up fees for certain students here in Scotland," she said.
Mr McConnell dismissed the claims and insisted: "We are not introducing variable top-up tuition fees, we have no intention of doing so, and it's not going to happen as long as I am first minister."
He accused the SNP "of all people" of favouring a system that would disadvantage Scottish students in years to come.
'Lib Dem u-turn'
However, Ms Sturgeon claimed higher education minister Nicol Stephen had said there was "no evidence" that suitably qualified Scottish students were unable to find places at Scottish universities.
"Applications for medical places from English students are actually down this year," she said.
Scottish Conservative MSP Murdo Fraser also insisted there was no evidence to suggest there was any necessity to bring in additional fees for medical students.
The Scottish Green Party said it was a major u-turn by Liberal Democrat MSPs, and claimed Lib Dems were supporting a policy opposed by their counterparts in Westminster.
The Scottish Socialist Party warned that the plan would hit working class families hardest.
Trainee doctors had spent time lobbying MSPs ahead of the debate urging them to vote against the proposals.