Lawmakers were off to the campaign trail after the Republicans, in danger of losing their control of Congress, played to their strength by pushing through a series of security-related bills.

In a flurry of activity before their departure early Saturday morning, the Senate gave final approval to $448 billion for the Pentagon, including $70 billion for the wars in Iraq and Afghanistan. The Senate also joined the House in approving construction of a 700-mile fence along the U.S.-Mexican border.

Congress also sent to the president legislation to ease the serious threat of terrorist attack using the 11 million shipping containers entering America's 361 ports every year.

And legislation to convene military trials to prosecute terror suspects cleared its final hurdle in the House.

In a legislative year that has been marked by sharp partisanship and the failure of Congress to agree on major lobbying reform and immigration legislation, action on the security bills gives Republicans one major plus as they try to convince voters to keep them in power.

Senate Majority Leader Bill Frist, a Republican, said Friday that in the weeks before the election Republicans must emphasize that they are the better party to fight the war on terror. "We're going to have to get the message out and we have to get it out aggressively over the next 41 days to do well, but I believe we can."

Congress will return after the Nov. 7 election for a lame duck session during which they will have to pass bills dealing with domestic spending for the fiscal year that begins Oct. 1.

So far, the only spending bills completed are the defense bill and a $35 billion bill for homeland security, also completed Friday night, that contains $1.2 billion to begin construction of fences and other barriers along the U.S.-Mexican border, plus money for jails to detain illegal immigrants and hire 1,500 more border agents.

Legislation validating President George W. Bush's warrantless wiretapping program will have to wait for a postelection lame-duck session colored by the November results. So will a bill to open the Outer Continental Shelf to oil and gas rigs.

Included in the defense budget: stopgap spending to keep agencies open through Nov. 17 if their funding bills have not passed. Those include measures funding veterans' health care, education, health research, anti-crime programs, among many others.

The final act of the Senate was approval of a companion defense bill including a 2.2 percent military pay raise, and setting policy on weapons spending and research programs considered vital to national security. The House passed the bill Friday by a bipartisan 398-23 vote.

The defense authorization bill was held up by Republican Sen. Tom Coburn because House-Senate negotiators dropped a Coburn-sponsored provision to analyze the costs effects of lawmakers' pet projects, called "earmarks," on Pentagon operations.

Coburn agreed to let the legislation go to a voice vote after he received a promise that his provision will be taken up when Congress returns in November. "The American people ought to be seeing where we are spending their money," he said.

The border fence is the single significant accomplishment of what had been an ambitious Republican agenda on immigration. No compromise could be found between Senate Republicans favoring a comprehensive bill including a plan to give illegal immigrants already in the United States an eventual chance at citizenship and House conservatives favoring an enforcement-only bill.

Also on Friday the Senate voted against taking up a House-passed bill that would criminalize the transporting of minors across state lines to obtain an abortion and avoid parental notification laws in the girl's home state.

Senators from New York and New Jersey also blocked Senate action on a bill authorizing $2.1 billion for victims of HIV/AIDS because they said it would shift aid from urban to rural areas.