Peers have backed calls to give 16- and 17-year-olds the right to take part in the UK's EU referendum.
The House of Lords voted to amend the European Referendum Bill - which paves the way for a poll by the end of 2017 - to extend the franchise, by 293 to 211.
The move was welcomed by Labour, the Liberal Democrats and the SNP
But the government said it was wrong to change the franchise "by the back door" and it would seek to reverse it when the bill returns to the Commons.
If the move is not overturned by MPs, it could affect the timing of the referendum vote. Some experts have suggested the process of registering the new voters who would be eligible to take part could delay the poll by up to a year, making it unlikely it could be held next year.
David Cameron, who has said the voting age should be determined by Parliament, is thought to favour a referendum date in 2016.
The defeat for the government came as Labour, the Lib Dems and crossbench peers joined forces with a small number of Tories.
'Winning the argument'
Labour said votes at 16 for all elections, including the EU poll, was "an idea whose time has come".
"Young adults should be able to have their say in the European referendum; after all it is about their future too," said shadow foreign secretary Hilary Benn. "David Cameron should now think again."
Lib Dem leader Tim Farron urged the government not to ignore the result or try to reverse it.
"The Liberal Democrats have been fighting for this for decades, and we are winning the argument," he said. "This is a victory for democracy. We are giving over a million people a voice on their future.
"The government must now listen and act. David Cameron cannot turn his back on 1.5 million young adults."
Supporters of the move, which also include the SNP, have said it would be unfair and illogical to bar 16 and 17-year-olds from taking part in a future EU vote, when they had been allowed to cast a vote in last year's Scottish independence referendum.
But critics argue the two polls are different and extending the franchise is designed to boost the campaign to keep the UK within the European Union.
The UK Independence Party said the House of Lords had over-reached itself and the decision should reside with the elected House of Commons.
"Young people in Britain are no fools, but those below the age of 18 do not have to pay taxes, but are subject to huge amounts of pro-EU propaganda in educational establishments," said Joe Jenkins, chair of the party's youth wing.
"The same people who want to give teenagers the vote, are the people who don't think that teenagers can judge for themselves over whether they should drink or smoke, but think they should be trusted with the country's future."
The government said it was "inappropriate to try to change the nation's electoral franchise through the back door of this bill".
"The House of Commons has voted on three occasions in recent months against dropping the voting age from 18 - including overturning a Lords amendment just yesterday," said minister John Penrose. "The government will re-affirm this clear position when the bill returns to the elected chamber and will seek to overturn this latest amendment from the Lords."