Donald Rumsfeld has said the US is not losing the Iraq war and it would be a mistake to set a timetable for American troops to leave the country.
Rumsfeld defended the administration's policies in Iraq
To set a deadline would "send a lifeline to terrorists", he told House and Senate committees.
But the US top Gulf commander General John Abizaid told the same Senate committee more foreign fighters were coming into Iraq than six months ago.
The hearings come amid waning public support in the US for the war.
A series of bombings in Iraq late on Wednesday and early on Thursday killed at least 30 people in Baghdad, while a recent opinion poll showed that 51% of Americans now think the invasion two years ago was a mistake.
"I believe there are more foreign fighters coming into Iraq than there were six months ago," Gen Abizaid told the Senate Armed Services Committee.
He said suicide bombers from Algeria, Tunisia and Morocco were entering Iraq via Syria, joining others from Saudi Arabia and Jordan.
"I would say there is a clear node inside Syria which facilitates it. Whether or not the Syrian government is facilitating it or ignoring it is probably a debatable question, but the key node is Damascus," he said.
Democrat Senator Carl Levin has suggested that the view is at odds with Vice-President Cheney's view that the insurgency was in its last throes.
Need for patience
A small bipartisan group in Congress has proposed a resolution calling on President George W Bush to start bringing home US troops from Iraq by 1 October 2006.
But Mr Rumsfeld said that timing in war was not predictable and there were no guarantees.
"And any who say that we've lost this war, or that we're losing this war are wrong. We are not," he told senators.
Setting a date for withdrawal would "send a lifeline to terrorists", he said.
Insurgents "have suffered significant losses in casualties, been denied havens, and suffered weakened popular support" in recent months, he added.
There was still a way to go, he said, but progress was being made.
"Success will not be easy and it will require patience... But consider what has been accomplished in 12 months," he said, mentioning the elections in January, economic improvements, and improvements in Iraq's security force.
Democrat Senator Edward Kennedy said that Mr Rumsfeld's predictions had been wrong in the past and repeated calls for him to resign.
But Mr Rumsfeld was backed by Gen Richard Myers, chairman of the Joint Chiefs of Staff, who told the panel that "leaving before the task is complete would be catastrophic".
The US has 135,000 troops in Iraq. The Pentagon says it has trained and equipped some 168,500 Iraqi police and military personnel.
However, the continuing violence had led some US commanders to scale back optimistic predictions that US troop numbers could be reduced any time soon, says the BBC's diplomatic correspondent, Jonathan Marcus.
And while Iraq's new security forces are growing in number, their effectiveness remains very much in doubt, our correspondent adds.