The Scottish Parliament has voted against UK Government plans to introduce identity cards.
Patrick Harvie tears up an ID card ahead of the debate
The measures were branded "regressive" and a threat to personal freedom during a debate called by the Scottish Greens at Holyrood.
Labour insisted that the system would actually strengthen civil liberties.
MSPs rejected ID cards by 52 votes to 47 after the Green motion received cross-party support, although the matter is reserved to Westminster.
The Liberal Democrats abstained from the vote.
Before the debate, the Greens staged a symbolic protest outside the parliament by tearing up mock ID cards.
One of the party's MSPs, Patrick Harvie, said he would not use an ID card if he was ever issued with one. He claimed they threatened the liberty of the citizen and that the system would cost £5.5bn to introduce.
He dismissed claims that law-abiding citizens had nothing to worry about, asking: "Would you feel the same if the state wanted to read your mail? After all if you've got nothing to hide, you've got nothing to fear.
"Would you feel the same if the state wanted to search your home? After all if you've got nothing to hide, you've got nothing to fear."
Mr Harvie predicted the scheme would be also dogged by technical problems which could end up costing taxpayers many millions more than estimated.
The ID card plans, thought to cost at least £3bn, would introduce a "biometric" card bearing their fingerprints and other personal details. It would involve the creation of a massive database.
Labour MSP Alasdair Morrison insisted that ID cards would aid law and order.
The system aims to cut fraud and hamper terrorism
He said: "The ID card scheme is part of Labour's wider agenda to make our community safer and more secure at every level - from our homes, our neighbours to our country.
"ID cards will protect people from identity theft and identity fraud, which undermine people's sense of security, and will certainly help tackle illegal working, abuse of the immigration system and the fraudulent use of public services."
He also attacked the Liberal Democrats, Labour's coalition partners, for what he branded "inconsistency" on the issue.
The Scottish Lib Dems, in their 2003 Partnership Agreement with Labour at Holyrood, ensured that ID cards would not be required for devolved services.
However, First Minister Jack McConnell said earlier this month that his party would review that arrangement during the 2007 Holyrood election.
Lib Dem MSP Jeremy Purvis said much of the information the ID cards would contain was already available and warned against the creation of a "senseless new national bureaucracy".
"Neither the New York or the Madrid terrorist attackers used false identities to carry out their evil," he said.
Tory justice spokeswoman Annabel Goldie warned biometric ID systems were "not infallible" and made a call for effective technology to be used and for proposals to be thoroughly scrutinised.
Scottish Socialist MSP Carolyn Leckie said: "If we need protecting from anyone, we need protecting from the state."