"Indeed, the level of violence and number of violent civilian deaths in Iraq were vastly higher than we have seen in Afghanistan," Petraeus said.
But Petraeus said that advances in Afghanistan are likely to be slower than they were in Iraq.
"Achieving progress in Afghanistan will be hard and the progress there likely will be slower in developing than was the progress achieved in Iraq," he said.
However, he added the announcement by Barack Obama, the US president, last week that he would send an additional 30,000 US troops "will over the next 18 months enable us to make important progress".
Petraeus is the latest US official to go before congress to promote Obama's war strategy.
Al Jazeera's John Terrett, reporting from Washington DC, said: "Apart from the issue of the 30,000 troops going into Afghanistan, the other key issue that the US congress is obsessing over is corruption within Afghanistan.
"It is really becoming a lot clearer that this is a much more difficult operation that may have been at first thought and is likely to last longer than that magic date of July 2011."
All of the additional US forces are expected to be deployed by the summer or autumn, aiming to reverse Taliban momentum and allow for a gradual US withdrawal starting in July 2011, according to Obama's plan.