Calling it a "down payment" on a commitment to the war on terror, President Bush signed the $340 billion annual defense bill devoted mostly to military operations and post-Sept. 11 recovery efforts on the home front.

Signed at the crash-scarred Pentagon Thursday, the bill sets aside $318 billion for Defense Department operations in the budget year that began Oct. 1. It also contains another $20 billion for the military campaign in Afghanistan and homeland recovery from the Sept. 11 terrorist attacks.

Bush said the bill "makes a down payment on a central commitment: We will give our forces everything they need to defeat global terror."

The bill's passage followed weeks of butting heads between the president and Congress over how the funds ought to be spent. In the end, however, the two came to a compromise in which Bush got the cash limits he wanted and Democrats got certain security measures they asked for.

Bush said he would add billions more to domestic security when he submits his 2003 budget proposal next month.

"I look forward to working for next year's budget, with the priorities of winning this war and defending our homeland," Bush said. "I'm confident the spirit that prevailed in late fall will spill over this year as we continue to remember the great goals that face this nation."

Although the bill reflects a $30 billion increase over the fiscal 2001 budget, most of that money goes to homeland defense and to Virginia, New York and other communities impacted by the hijackings and subsequent attacks on Sept. 11.

Bush was able to come through on his campaign promise to ease the financial burden on military service members – the bill reduces from 15 percent to 11 percent the amount of money military personnel must pay out of pocket for off-base housing, with a goal of eliminating that cost altogether by 2005.

"We can never pay our men and women in uniform on a scale that matches the magnitude of their sacrifice," Bush told the crowd of 200, most of them in uniform, in a Pentagon auditorium. "But this bill reflects our respect for your selfless service."

The measure also includes funds for hiring more Customs Service inspectors, countering bioterrorism, hiring sky marshals and strengthening cockpit doors, bolstering security at the Capitol, and reimbursing law enforcement agencies that responded to the Sept. 11 plane crashes.

"This nation must have, and will have, ready forces that can bring victory to our country and safety to our people," Bush said. "This nation must give our military the weapons it needs to meet the threats of our future."

The Associated Press contributed to this report.