WASHINGTON (CNN) -- President Bush on Monday signed a bill that will pay for the wars in Iraq and Afghanistan through the remainder of his presidency and into spring 2009.
President Bush on Monday said the men and women of the armed forces deserve "our unflinching support."
The supplemental spending bill provides nearly $162 billion in war funding without the restrictions congressional Democrats vowed to put into place since they took control of Congress nearly two years ago.
After signing the bill, Bush said the men and woman of the armed services are owed "our unflinching support, and the best way to demonstrate that support is to give them the resources they need to do their jobs and to prevail."
Bush also said he appreciated that "Republicans and Democrats in Congress agreed to provide these vital funds without tying the hands of our commanders and without an artificial timetable of withdrawal from Iraq." Watch as Bush thanks Congress »
"This bill shows the American people that even in an election year, Republicans and Democrats can come together to stand behind our troops and their families," Bush said.
He also touted the success of the "surge" strategy he implemented last year.
"Our troops have driven the terrorists and extremists from many strongholds in Iraq. Today, violence is at the lowest level since March of 2004," he said. "As a result of this progress, some of our troops are coming home, as a result of our policy called 'Return on Success.' We welcome them home."
White Houses spokeswoman Dana Perino called the bill a victory for the president.
"Because we have seen success in the surge, perhaps Congress decided that it was OK to allow the commander in chief to be able to move forward as he saw fit," said Perino, noting the $162 billion was the same amount that the president had requested.
The supplemental spending bill also contains a new GI Bill that expands education benefits for veterans who have served since the 9/11 attacks, provides a 13-week extension of unemployment benefits and more than $2 billion in disaster assistance for parts of the Midwest that have been hit by record floods.
The signing comes two weeks before the deadline that Defense Secretary Robert Gates had established for the funds. Gates said he would consider laying off Defense Department employees to balance the Pentagon's books if legislation was not signed by July 15. Watch a progress report from the U.S. ambassador to Iraq »
House Democrats had tried to include restrictions on war funding when they drafted the bill, but they were unable to overcome procedural hurdles that Republicans put up.
A compromise version of the supplemental bill was later negotiated between Democratic and Republican leaders that included the war funding along with the GI Bill, unemployment benefits and disaster relief -- three top legislative priorities for the Democrats that Bush and congressional Republicans originally resisted.
"At a time when 2 million men and women have fought in Iraq and Afghanistan and when our troops have had to endure multiple deployments, stop-loss policies, insufficient equipment and an unclear strategy, giving them the opportunity to fuel our future economy is the least we can do," Senate Majority Leader Harry Reid, D-Nevada, said of the GI Bill after the Senate sent it to the president's desk Thursday night.
Congressional Democrats regained control of the House of Representatives and Senate after the 2006 midterm elections in large part to due to displeasure over the Iraq war.
But Democrats -- lacking the 60 votes to overcome GOP filibusters in the Senate, let alone the two-thirds majorities in both the House and Senate to override a presidential veto -- have been unable to pass significant restrictions on war funding because Republicans, for the most part, have stuck with Bush on the war.