Updated

A plan to tighten U.S. borders by requiring passports or tamper-resistant identification cards from everyone entering the country has been delayed.

House and Senate lawmakers agreed to push back the program by 17 months, saying they want to make sure new ID cards being developed by the Bush administration will better secure borders against terrorists without slowing legitimate travelers from Canada and Mexico. The new ID's will be required for Americans and all others entering the U.S.

The border crackdown was wrapped up in an overall $34.8 billion spending plan for the Homeland Security Department. The House and Senate each aim to approve it later this week, before lawmakers recess for the elections.

The spending bill reflects "a dramatic step forward toward making sure that our borders are secure," Sen. Judd Gregg, R-N.H., who helped negotiate the measure, said Tuesday.

Gregg added: "We still have a long way to go. Nobody is going to argue about that."

The massive spending bill also includes plans to:

—Spend $1.2 billion on border fencing, vehicle barriers and technology to prevent illegal immigrants and criminals from sneaking into the country.

—Overhaul the Federal Emergency Management Agency to give its director a direct line to the president during catastrophes and remerge disaster preparedness planning with response missions.

—Give the Homeland Security Department authority to shut down chemical plants that fail to meet security standards.

—Buy nuclear detectors to scan shipping cargo and hire more Coast Guard inspectors and Customs agents at seaports.

—Allow Americans to legally import a 90-day supply of prescription medications from Canada by carrying them back across the border, while retaining bans on importing drugs by mail or the Internet.

Lawmakers who represent states on the Canadian border have long opposed the tamperproof ID program that was urged by the 9/11 commission. They fear the plans will slow cross-border commerce with Canada — the largest trading partner of the U.S. — and scare away tourists.

Currently, border crossers need only a picture ID card, like a driver's license, and a birth certificate to get into the United States. Neither document would be accepted under the proposed rules because they can be easily forged.

Instead, the administration is seeking to require border crossers to show passports or a cheaper alternative, dubbed a "PASS" card, that is still being designed. But technology to read the cards, as well as security standards to make sure they work, is not ready. The congressional agreement worked out Monday night would delay the program until June 2009.

"This has been shaping up as a train wreck in slow motion," Sen. Patrick Leahy, D-Vt., said Tuesday. "Poor planning and premature implementation of this system could clog our borders while making us even less secure."

Homeland Security Secretary Michael Chertoff told Congress Tuesday he would consider permitting travelers to use alternative forms of ID, such as driver's licenses, if they are improved to prevent tampering or other forgeries.

"Our interest here is in an efficient and inexpensive, but nevertheless reliable, form of identification that achieves the recommendation of the 9/11 commission," Chertoff told the House Homeland Security Committee.

Democrats said the spending plan doesn't go far enough, and called for more money for emergency responders and ports, as well as stronger protections at chemical plants.

"We need to do all that we can to protect this country, and I don't think this bill does that," said Rep. Marion Berry, D-Ark.