Congress yesterday gave its near-unanimous consent to military action in response to Tuesday's terrorist attacks -- and provided $40 billion to help cover the cost of retaliation and rebuilding -- as lawmakers transcended partisan splits with vows of unity against a common enemy.

In a series of rapid-fire votes, both the Senate and the House approved the spending bill early in the day, after which the Senate approved the resolution backing President Bush in military action against those found responsible for the attacks. The House approved the use-of-force resolution last night.

The votes were remarkable for their gravity, urgency and absence of the partisan bickering that had prevailed in both chambers until the moment of the air assaults on New York and Washington. Having resolved earlier differences with the White House over both bills, normally loquacious senators did not even take time to debate the measures, somberly calling out "aye" as the clerk read their names alphabetically.

Taking a different course, House members devoted five hours to discussing the resolution before reaching the same result by a vote of 420 to 1.

"This may be the great challenge for our generation," House Speaker J. Dennis Hastert (R-Ill.) said last night. "It may take years. It may cost additional lives. It may require additional sacrifices from our citizens. But great challenges have made us stronger in the past."

Bush said in a statement, "I am gratified that the Congress has united so powerfully by taking this action. It sends a clear message -- our people are together, and we will prevail."

While many lawmakers said Bush does not need congressional authority to take military action -- an argument that presidents have long endorsed -- Bush had sought the resolution as a way of demonstrating the country's unity to its enemies and the world.

In the latest of a nearly week-long series of joint appearances, Majority Leader Thomas A. Daschle (D-S.D.) and Minority Leader Trent Lott (R-Miss.) stressed the extraordinary bipartisanship that Congress has demonstrated since the Tuesday attacks.

"This has been an historic day in what has been obviously quite an historic week," Daschle said. "Once again the Senate has pulled together, not as Democrats or Republicans, but as Americans, responding to a crisis in a way that Americans expect."

"We could quibble for days or for weeks. . . . We could parse every word," Lott agreed. "But the Senate, united like I have never seen it before, chose not to do that."

Speaking of the use-of-force authorization, Lott said: "I believe that it's broad enough for the president to have the authority to do all that he needs to do to deal with this terrorist attack and threat. I also think that it is tight enough that the constitutional requirements and limitations are protected."

Though it may prove ephemeral, the new atmosphere of shared purpose marks a striking change for Congress. Less than a week ago, lawmakers were crowding the Sunday talk shows to snipe at each other over the fate of a few billion dollars in the Social Security "lockbox." Yesterday they passed a $40 billion emergency spending bill -- double Bush's original request -- with nary a murmur of dissent.

White House officials and congressional leaders of both parties negotiated late into Thursday night on both the spending bill and the use-of-force resolution, attempting to strike a delicate balance between presidential and congressional war-making powers and avoid a divisive debate that could shatter the government's facade of unity.

Lawmakers from both parties objected to an initial White House draft of the war powers measure that would have given the president broad authority to "deter and prevent any related future acts of terrorism and aggression against the United States."

The final resolution, approved 98 to 0 in the Senate, is worded more narrowly. It authorizes the president "to use all necessary and appropriate force against those nations, organizations or persons he determines planned, authorized, committed or aided the terrorist attacks that occurred on Sept. 11 or harbored such organizations or persons, in order to prevent any future acts of international terrorism against the United States by such nations, organizations or persons."

Instead of milling about the floor, as they usually do during a roll call, the senators cast their votes while sitting at their desks, a tradition reserved for only the weightiest matters of state. Afterward many boarded buses to attend a prayer service with President Bush at National Cathedral. Only one member of the House, Rep. Barbara T. Lee (D-Calif.), voted against the resolution.

The spending bill provides an emergency appropriation of $40 billion to assist recovery operations, repair damaged facilities, strengthen security and fight terrorism. Bush had originally requested $20 billion, but congressional leaders insisted on doubling the amount to cope with the devastation caused by the attacks, especially in New York.

"New York has two words to America: Thank you. You were there in our hour of need. You've shone a little light in our great darkness," said Sen. Charles E. Schumer (D-N.Y.). "And we'll be back."

Under the legislation, Bush could immediately spend $10 billion as he wishes. Another $10 billion will be made available no more than 15 days after the White House submits a plan for allocation of the funds to the House and Senate appropriations committees.

The other $20 billion would be made available only if Bush requests it and is approved as part of next year's appropriations bills. No less than $20 billion, or half the total amount, is to be spent on disaster recovery operations and other forms of assistance in response to Tuesday's attacks in New York, Virginia and Pennsylvania.

Rep. David R. Obey (Wis.), the top Democrat on the House Appropriations Committee, said the measure "provides unprecedented grants of authority to the president, but it does retain reasonable congressional ability to make its own judgments about how this money ought to be spent."

But Obey also warned the $40 billion bill was simply "a down payment" on a "long twilight struggle against terrorism. This is going to be a very nasty enterprise."

The Senate approved the measure 96 to 0 and the House later did the same, 422 to 0.

Yesterday's use-of-force resolution grows out of a long struggle between Congress and the executive branch over the president's authority to use military force. Under the Constitution, only Congress has the power to declare war. At the same time, the president is designated commander-in-chief, a title that presidents have long argued gives them broad authority to make war without seeking congressional approval.

In response to the Vietnam War, Congress sought to increase its role as a check on presidential war-making authority by passing -- over President Richard M. Nixon's veto -- the War Powers Resolution of 1973. The law requires presidents to seek congressional authority for launching military action except in cases of "national emergency."

Presidents have continued to defend their right to initiate military action on their own. In January 1991, however, Bush's father sought to confer legitimacy on U.S. military operations against Iraq by seeking approval from Congress, which granted it after two days of divisive debate. Yesterday, his son found the going considerably easier.

"Under the Constitution, the president already possesses this authority, but it is enhanced, and our cause strengthened, by the support of Congress," said Sen. John McCain (R-Ariz.).

Senate leaders Trent Lott (R-Miss.), left, and Thomas A. Daschle (D-S.D.) stressed both parties support the measures.