Washington  - US President George W. Bush on Monday signed into law a 162-billion-dollar spending bill funding the Afghanistan and Iraq wars well into 2009 - roughly six months into his successor's term. "With this legislation, we send a clear message to all that are serving on the front line that our nation continues to support them," he said after signing the bitterly debated legislation at the White House. Democrat Barack Obama and Republican John McCain " Bush's chosen heir " have feuded sharply over Iraq as they battle over who will win the November election and the keys to the White House in January 2009. The war remains vastly unpopular, and part of the reason that Bush's job approval sits at record lows, with roughly two out of three Americans in recent opinion polls saying the March 2003 US-led invasion was a bad idea. And the surveys suggest that most Americans are more concerned with the faltering economy than with Iraq as they reel from an epidemic of home foreclosures, job losses and skyrocketing gasoline prices. Bush has taken pains to underline security gains in Iraq resulting from his decision to "surge" roughly 30,000 more soldiers there in January 2007, and stressed that the troops are coming home as a result. Critics have countered that political progress remains elusive and that the "surge" failed to achieve its goal of handing security for the whole country to Iraqi forces by November 2007. But while Democrats won the US Congress in November 2006 partly on pledges to end the war, they have failed to set a timetable for bringing home the roughly 150,000 US troops in Iraq. "I appreciate 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," Bush said. "Our troops have driven the terrorists and extremists from many strongholds in Iraq. Today, violence is at the lowest level since March of 2004. 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," said Bush. Democrats took comfort from having inserted into the legislation a modern version of the post-World War II GI Bill to expand education benefits to veterans, a plan that Senate Republicans and the White House had opposed. The veterans' benefits part of the legislation also included a 13-week extension of unemployment benefits and aid for Midwest flood victims. "I'm pleased that the bill I sign today includes an expansion of the GI Bill. This legislation will make it easier for our troops to transfer unused education benefits to their spouses and children," said Bush. The legislation calls on the Iraqi government to spend as much money as US taxpayers for reconstruction, and bars the Bush administration from using the funding to establish permanent bases in Iraq.