WASHINGTON  After more than a year of heated political wrangling, the Senate handed the White House a major victory Tuesday by voting to broaden the government’s spy powers after giving legal protection to phone companies that cooperated in President Bush’s warrantless eavesdropping program.

The Senate rejected a series of amendments that would have restricted the government’s surveillance powers and eliminated immunity for the phone carriers, and it voted in convincing fashion  69 to 29  to end debate and bring the issue to a final vote. That vote on the overall billwas an almost identical 68 to 29.

The House has already rejected the idea of immunity for the phone companies, and Democratic leaders reacted angrily to the Senate vote. But Congressional officials said it appeared that the House would ultimately be forced to accept some sort of legal protection for the phone carriers in negotiations between the two chambers this week.

The Senate debate amounted to a proxy vote not only on the president’s warrantless wiretapping program, but also on a range of other issues that tested the president’s wartime authority, from secret detentions to wiretapping issues. The discussion in effect presaged the debate over national security that will play out this year in the presidential and congressional elections.