Petraeus, a fitness fanatic who was treated for prostate cancer last year, appeared to slump over his seat before being helped by aides and walking out of the room.

"It wasn't Senator McCain's questions," he joked later after recovering, referring Arizona Senator John McCain who was questioning him at the time over the pace of military action in Afghanistan  during the Senate Armed Services Committee hearing.

Petraeus, 57, had finished telling McCain that he believes the planned 2011 pullout of US troops in Afghanistan remains on track, and McCain was responding when the room fell silent and aides began crowding around the four-star general.

"(I) got dehydrated, I think," he said, adding that he ate a couple of bananas and felt better.

Sen. Carl Levin returned several minutes later to say that the general appeared to be OK.

Petraeus returned to the room briefly and told the senators he "was feeling a little bit light-headed there.

In his lengthy appearances before the Senate and House armed services committees in September 2007 to testify on Iraq, he was reported to have endured great back pain and got through it with the help of Motrin.

The general has had a high-profile career, and many believe he is the leading candidate to become the next chairman of the Joint Chiefs of Staff. He commanded all forces in Iraq under President George W. Bush.