The US Senate passed a bill Tuesday that would create an electronic ID card designed to stop illegal immigrants from getting driver's licenses. The bill, which was tacked onto a measure to pay for military activities in Iraq, was passed by Congress earlier this year.

The legislation, which President George W Bush is expected to sign, requires states to issue federally approved electronic ID cards, including driver's licenses. Anyone without such a card would not be permitted to board an airplane or Amtrak train, to open a bank account or to enter a federal building.

Called the Real ID Act, the bill mandates that driver's licenses and other ID cards include a digital photo, various features designed to thwart counterfeiting and a "common machine-readable technology" such as a radio frequency identification (RFID) tag. The technology must meet requirements set out by the U.S. Department of Homeland Security.

The provisions take effect in May 2008.

"The Real ID is vital to preventing foreign terrorists from hiding in plain sight while conducting their operations and planning attacks," House Judiciary Committee Chairman F James Sensenbrenner (R-Wisconsin) said in a statement. "By targeting terrorist travel, the Real ID will assist in our War on Terror efforts to disrupt terrorist operations and help secure our borders."

But critics, including the San Francisco-based Electronic Frontier Foundation and the American Civil Liberties Union, said that the bill will bring the United States a giant step closer to creating a national ID system, which would be a tempting target for identity thieves.

"The Real ID Act would establish a vast national database of ID holders, where even a small percentage of errors would cause major social disruption," according to a statement by the EFF. "The ID would essentially be an internal passport that would be shown before accessing planes, trains, national parks, and courthouses – an irresistible target for forgers and identity thieves."

The EFF also said that by calling for the use of "common machine-readable technology," the REAL ID Act will pave the way for the federal government to force every state to put RFID chips into the ID cards.

Plans to issue electronic passports for US citizens travelling abroad have raised concerns of their own.

"The federalisation of driver's licenses and the culling of all information into massive databases creates a system ripe for identity theft," said Timothy Sparapani, an ACLU legislative counsel, in a statement. "New standards could place our most private information – including photographs, address[es] and Social Security numbers – into the hands of identity thieves."

The ACLU also said that the measure, if signed into law, would make it harder for legal immigrants to obtain a driver's license. And it denounced the way the law won passage in the House by being added to a funding bill for the military.

"The Real ID Act was sold as an illegal-immigration fix bill, when in fact it reduces every American's freedom," Sparapani said. "The provisions of this bill could not have passed on their own. Sadly, their inclusion in a 'must pass' bill means that immigrants and citizens alike will face an unnecessary loss of freedom and privacy."