Bush said he would veto the measure, and that Congress should not tie the hands of the military by trying to make decisions for those involved in the fighting.
"We stand united in saying loud and clear that when we've got troops in harm's way, we expect those troops to be fully funded, and [when] we've got commanders making tough decisions on the ground, we expect there to be no strings on our commanders," Bush said.
The Democrat-controlled Senate stipulated that Bush start withdrawing the troops from Iraq within four months.
The vote passed by 51-47, mostly on party lines. It provides $122 billion to pay for the wars in Iraq and Afghanistan. The Pentagon warned earlier this week that it would run out of money by
the middle of next month unless fresh funds are approved.
The bill also allocates millions of dollars for a number of
domestic programs unrelated to the war effort. Bush said they did not
merit inclusion in war-related legislation.
The Senate wrapped up its debate on the war earlier this week.
Republican Senator John McCain (Republican, Arizona), a 2008 presidential candidate, said the military should be allowed to implement its new strategy in Iraq and see whether it works. That strategy, which is now under way, calls for thousands of additional U.S. troops in Baghdad to patrol neighborhoods and try to reduce the violence.
"This body unanimously confirmed [the new U.S. commander in Iraq] General [David] Petraeus," McCain said. "Why would we now deprive him of the opportunity to pursue the strategy he helped design and believes can work? Why would we hand the enemies a victory when we've finally taken the initiative and they are on the defensive? Let us give him, and the soldiers he has the honor to command -- Americans who are risking everything so that this plan can succeed -- the time necessary to achieve its objective."
But Democrats, joined by some Republicans who support setting a withdrawal date, were equally outspoken.
A prominent critic of the war from Bush's own party, Senator Chuck Hagel (Republican, Nebraska), said: "America finds itself in a dangerous and isolated position in the world, we are perceived as a nation at war with Muslims. This debilitating and dangerous perception must be reversed as the world seeks a new center of gravity for this new century. The United States must begin planning for a phased troop withdrawal from Iraq. The cost of combat in Iraq in terms of American lives, dollars, and world standing has been devastating for our country."
The U.S. House of Representatives on March 23 narrowly passed legislation that set a September 2008 pullout deadline.
The two bills must now be reconciled before being sent to the president.