The Scottish Government brought forward the change after the age group was given the chance to take part in last year’s independence referendum.
The Scottish Election (Reduction of Voting Age) Bill will lower the voting age from next spring, allowing 16 and 17-year-olds to be involved in May’s Holyrood election.
Deputy First Minister John Swinney said: “It has been a long-standing policy of this Government to lower the voting age to 16 where we can and that policy now has, I am pleased to say, cross-party support across the chamber.
“I am delighted to have reached consensus on the principle.
“Building on that, I have been impressed by the thoughtful and passionate contributions that young people have made to the debate on the current proposals to extend the franchise permanently.”
He said the legislation “provides a detailed, workable and practical framework to allow 16 and 17-year-olds to register for and vote in Scottish elections”, replicating the work done during the referendum.
Mr Swinney added: “I do think the whole experience of enabling 16 and 17-year-olds to vote in the independence referendum last September, which has been acknowledged to be an enormous political decision, and one that was taken very seriously by the young people who were able to vote, rather vindicates and strengthens the argument to enable 16 and 17-year-olds to vote, and I think it is a real missed opportunity on the part of the UK Government not to enable 16 and 17-year-olds to vote in the EU referendum.”
Labour’s Lewis Macdonald said: “This Bill is notable in delivering a significant amount of change with a minimum of fuss and a maximum of agreement.
“In passing this Bill we should celebrate the democratic participation of all our citizens, the 100,000 or so 16 and 17-year-olds, the million over-65s and everyone in between.
“We are extending the franchise precisely because we know from experience that democracy works.
“For the same reason, we should indeed champion the case for votes at 16 in the referendum on membership of the EU and for making the franchise for that referendum as inclusive as possible.”
Conservative MSP Annabel Goldie told MSPs that the Bill was an important moment for young people and democracy.
“This Bill heralds an exciting era for our young people,” she said.
“I think it is an opportunity for them to continue their high level of engagement in topical affairs that we saw with the independence referendum.”
MSPs rejected a plea from Liberal Democrat Alison McInnes for the legislation to be altered so that Scottish ministers can decide if some young offenders can vote.
While prisoners are barred from voting in the UK, the Lib Dem MSP put forward an amendment that would mean this would no longer automatically apply to 16 and 17-year-olds in secure accommodation or penal institutions.
The Scottish Government would then be able to decide the circumstances in which they may be able to vote in future Scottish and local government elections.
MSPs voted 86 to eight against the proposal.