The top US commander in Iraq admitted yesterday that the conflict would "get harder before it gets easier", providing further ammunition for Democrats determined to face down George Bush in their constitutional clash over the Iraq war.

Hours before the Senate passed legislation ordering troops to start leaving Iraq by October, General David Petraeus said the conflict was "the most complex and challenging I have ever seen". Gen Petraeus, who was put in charge of the Baghdad troop "surge" to pacify the Iraqi capital, warned of the enormous commitment and sacrifice facing the US in Iraq.

His downbeat assessment, in contrast with Mr Bush's optimistic statements, stiffened the resolve of Democrats in Congress pushing for an early withdrawal of US troops. Yesterday the Senate followed the House of Representatives in backing legislation that calls for most US troops to be out by spring 2008.

The bill is expected to land on Mr Bush's table on Tuesday, the fourth anniversary of the speech in which he prematurely declared an end to hostilities. Under the legislation billions of dollars of military funding will be withheld unless Mr Bush sets in motion the withdrawal timetable.

The White House, which has described the bill as a timetable for surrender, reiterated yesterday that Mr Bush would veto it. As the Democrats do not have the two-thirds majority needed to overturn the veto, a stand-off is inevitable.

Democratic members of Congress claim the "surge" is doomed to failure, a scepticism shared by some Republicans.

Gen Petraeus returned to Washington this week to brief the president and members of Congress. Although he agreed with Mr Bush that there had been some improvements in the two months since the arrival of US reinforcements, he also stressed that the achievements "have not come without sacrifice". He noted the increasing use of car bombs and suicide attacks has "led to greater US losses" and Iraqi military casualties. Suicide bombers claimed the lives of nine US paratroopers this week, while last week witnessed the deadliest single suicide bombing in Baghdad, when 140 died in a market attack.

Asked how long the US would have to remain in Iraq, he said he could not anticipate what the level "might be some years down the road".

Nancy Pelosi, the Democratic House speaker, said: "The sacrifices borne by our troops and their families demand more than the blank cheques the president is asking for, for a war without end."

In reality, the Democrats will not choke off funds to US troops in the field. But they will try to force Mr Bush to compromise. One route being discussed by Democrats would be to set benchmarks for the Iraqi government to tackle sectarian violence; failure to act fast enough would trigger withdrawal. One step the Democrats are insisting upon would be for the Shia-led Iraqi government to agree a fair formula for sharing oil revenues with other groups.