David Petraeus has apologised to an audience of many veterans for the conduct that led to his resignation as head of the CIA following the disclosure of an extramarital affair.

He made the comments during his first public speech since his resignation in November to a group of about 600 people, including many veterans at the University of Southern California's annual Reserve Officers' Training Corps dinner. The hero of the Iraq and Afghanistan wars has remained largely out of the public eye since resigning.

"Needless to say I join you keenly aware that I am regarded in a different light now than I was a year ago," Petraeus said. "I am also keenly aware that the reason for my recent journey was my own doing. So please allow me to begin my remarks this evening by reiterating how deeply I regret and apologise for the circumstances that led me to resign from the CIA and caused such pain for my family, friends and supporters."

His lawyer, Robert B Barnett, has said Petraeus has been spending much of his time with his family.

Petraeus received applause and a standing ovation before he began the evening's program by cutting a cake, a task reserved for the highest ranking person in the room.

The retired four-star general's affair with his biographer, Paula Broadwell, was discovered during an FBI investigation into emails she sent to another woman she viewed as a rival for his attention.

At the time Petraeus told his staff he was guilty of "extremely poor judgment … Such behaviour is unacceptable both as a husband and as the leader of an organisation such as ours."

As the military leader credited with reshaping US counterinsurgency strategy in Iraq and Afghanistan, Petraeus had expected a friendly audience at the ROTC dinner. Ahead of the speech Petraeus drew lavish praise from USC's president, CL Max Nikias, who called him "arguably the most effective military commander since Gen. Dwight D. Eisenhower".

"In our post 9/11 world General Petraeus's influence on our military is unmatched and his contributions to the CIA are far-reaching," Nikias said.