He said "the trends in Afghanistan have not gone in the right direction... and that has to be addressed".
Afghanistan remained a "hugely important endeavour", he said.
Earlier this week, President George W Bush announced a cut of 8,000 US troops in Iraq by February - with some 4,500 being sent to Afghanistan.
'Hard but hopeful'
Gen Petraeus took up his role in Iraq in February 2007, as President Bush announced his "surge" plan.
He has overseen its implementation, including the deployment of nearly 30,000 additional troops to trouble spots in Iraq.
In an interview with the BBC's Newsnight programme, Gen Petraeus said that when he took charge in Iraq "the violence was horrific and the fabric of society was being torn apart".
Gen Petraeus said the Iraqis were standing up as US forces stood down
Leaving his post, he said there were "many storm clouds on the horizon which could develop into real problems".
Overall he summed up the situation as "still hard but hopeful", saying that progress in Iraq was "a bit more durable" but that the situation there remained fragile.
He said he did not know that he would ever use the word "victory": "This is not the sort of struggle where you take a hill, plant the flag and go home to a victory parade... it's not war with a simple slogan."
He said al-Qaeda's efforts to portray its jihad in Iraq as going well were "disingenuous". It was, in fact "going poorly", he said.
Of his strategy of establishing joint security stations in key locations, Gen Petraeus said that "you can't secure the people if you don't live with them".
He said it was now fair to say that the Iraqis were standing up as US forces stood down. The confidence and capability of Iraqi forces had increased substantially, he said.
Gen Petraeus did not confirm reports in the media that the US was preparing to withdraw all troops from Baghdad by next summer, but he did say that consideration was being given to removing US forces from a number of cities, including the capital.
Watch the interview in full on the BBC's Newsnight programme, BBC2, Thursday 11 September at 2230 BST.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.