The House overwhelmingly approved legislation Thursday to try and stop nuclear weapons from being smuggled into the country by screening all cargo for radiological materials at seaports.

The 421-2 vote capped months of election-year debate in Congress over how to make the 140 U.S. seaports less vulnerable to terrorist threats without curbing commerce.

The bill "will improve the safety of the American people and the security of our global supply chain," said Rep. Dan Lungren, R-Calif. He said it "ensures our shores are our last line of defense, not our first."

Click here to see how your representative voted.

The Homeland Security Department currently opens for inspections 6 percent of the 11 million cargo containers that enter U.S. seaports annually. Those containers are considered high-risk, said department spokeswoman Leah Yoon, for reasons such as the security of the originating port or a shipper's history.

The department aims screen 65 percent of goods for radiological materials by October, Yoon said.

The administration said it may not have the money to put nuclear detectors at 22 major ports by next year as the legislation requires. It also termed as unnecessary a $400 million annual grant program over six years to pay for other security measures at ports.

A statement by the White House Office of Management and Budget said it was concerned about parts of the $5.5 billion bill "that have serious resource implications."

A debate over the bill briefly escalated into a shouting match when the chairman of the House Homeland Security Committee, GOP Rep. Peter King of New York, said his Long Island district lost more 150 residents in the attacks of Sept. 11, 2001.

Taking aim at Rep. Edward Markey, D-Mass., who earlier held up a cargo container's lock to call for stronger security seals, King said: "I don't need visual aids to remind me what happened on September 11."

"There were Bostonians on that plane!" Markey yelled back.

Congress made port security a priority after the fight this year over a Dubai company's purchase of a British company that controlled of some operations at six American ports. The outcry led the Dubai company, DP World, to decide to sell the U.S. operations to an American company.

House Democrats said the legislation does not go far enough to secure ports as they pushed an alternative that would require X-rays for all cargo at foreign ports that is headed to the United States.

Republicans said this requirement would snarl port traffic and stymie the economy because the high-tech X-ray technology needed is not widely available.

"All it takes is one atomic or radiological bomb to make 9-11 look like a firecracker," said Rep. Jerrold Nadler, D-N.Y. "If we really want to make this country safer, we must demand that before any container is put on a ship bound for the United States it must be scanned electronically in the foreign port. It's too late if we find a nuclear bomb in Los Angeles or New York."

The bill calls for screening 98 percent of all incoming cargo with the nuclear detectors by Oct. 1, 2007. The measure includes:

—$2.4 billion for ports security grants over six years; King said the money would be shifted from U.S. Customs funds.

—$1.2 billion to expand and enhance security measures at foreign ports. That could mean buying radiation detectors to install worldwide.

—$536 million for research and development at Homeland Security's office of domestic nuclear detection. Of this, an estimated $157 million would be spent on the radiation monitors, House aides said.

Currently, 214 radiological monitors that screen for nuclear materials are installed at U.S. seaports, at an estimated cost of $350,000 each, Yoon said.

The House bill would require port workers to secure ID cards with tamper-resistant digital photographs — something Homeland Security is already doing.

A Senate committee has approved a similar bill that would require Homeland Security to provide nuclear screening and X-ray imaging of cargo at three foreign seaports as a test pilot that could be expanded.