Controversial plans to introduce ID cards have cleared the Commons - but with the government's majority slashed to its lowest since the election.
Charles Clarke says cards are vital to fight terrorism
MPs gave the flagship ID Cards Bill a third reading by 309 votes to 284, a majority of just 25.
The bill now goes to the House of Lords where it faces a further rocky ride.
Charles Clarke said the bill would not remove civil liberties but give people more control over their identities. But Tories said it was "politically inept".
Earlier, 21 Labour rebels, backed by opposition MPs, tried to block moves to force passport applicants to submit their details to the ID cards database.
But that attempt failed by 310 votes to 278, slashing Labour's majority to 32.
The vote came after Labour MP Neil Gerrard tabled an amendment to the bill that would make it possible for people to apply for a passport without having to submit their details for the ID cards database.
He said British people had had the right for hundreds of years to leave the country and return.
Now they would not be able to do so without registering their personal details, he said.
He accused the government of introducing "creeping compulsion" despite a manifesto pledge that the ID cards scheme would initially be voluntary.
But Home Secretary Charles Clarke denied ID cards would lead to a "Big Brother state" or remove civil liberties.
He said the bill would set limits on the information that could be stored on the database register.
"There will be no criminal convictions on that register, no medical records, no financial records, no political or religious opinions," he said.
Any possible linkage to details held in the Police National Computer was also removed during the bill's Report Stage.
But Labour's Bob Marshall-Andrews said the bill was "the most illiberal piece of legislation we have been asked to pass in this House for half a century".
Edward Garnier, for the Tories, said: "It is wholly unhealthy for us as a Parliament to give this government unseen powers over the citizen and over the way in which he conducts his or her life."
Earlier a Liberal Democrat attempt to send the legislation back to committee for further investigation failed by 326 votes to 243 votes.
Under the scheme, face, iris and fingerprint scans will be used to identify people.
Last week, Mr Clarke revealed people would have to pay £30 for a stand-alone identity card.
But it is expected most people will want a combined passport and ID card, costing an estimated £93 each to make. The cards will be valid for 10 years.
During the Second Reading debate in June, 20 Labour MPs voted against the bill, including four of Tony Blair's former ministers.