Updated

Retired Army Gen. David Petraeus issued an extraordinary public apology to Congress on Tuesday for sharing classified information with his biographer and mistress, saying it was a "violation of trust."

Petraeus appeared before the Senate Armed Services Committee to discuss the Middle East, in his first public testimony to lawmakers since resigning as CIA director. He started by addressing what led to his resignation.

"Four years ago, I made a serious mistake -- one that brought discredit on me and pain to those closest to me," Petraeus said, of sharing information with mistress Paula Broadwell. "It was a violation of the trust placed in me and a breach of the values to which I had been committed throughout my life."

Petraeus said he cannot "undo" what he did. "I can only say again how sorry I am to those I let down and then strive to go forward with a greater sense of humility and purpose, and with gratitude to those who stood with me during a very difficult chapter in my life."

Petraeus went on to address the subject of the hearing, and presented a grave picture of the state of the Middle East, describing a "revolutionary upheaval that is unparalleled in its modern history."

He said the progress achieved so far in fighting Islamic State militants in Iraq has been "inadequate" and suggested the U.S. increase support to Iraqi security forces and Sunni tribal and Kurdish fighters.

He warned lawmakers that Syria, in particular, is a "geopolitical Chernobyl" whose fallout "will be felt for decades."

In Syria, he recommended the U.S. take a harder stance against President Bashar Assad. While the Obama administration has stressed the importance of a political solution in Syria, Petraeus argued there needs to be a stronger military plan for that to succeed.

He called for setting up enclaves protected by coalition airpower where moderate Sunnis could be supported, civilians could find refuge and additional forces could be trained.

"Inaction can carry profound risks for our national security," Petraeus said, adding that when the U.S. "doesn't fill the vacuum, others will" -- in reference to Russia.

As Moscow sends jets, tanks and other equipment to Syria in support of Assad's regime, Petraeus also warned that the Obama administration should not allow Russia to push the U.S. into an alliance with Assad. He noted that if Russia had wanted to fight the Islamic State, it could have joined the U.S.-led coalition, but didn't.

Petraeus retired in 2011 after commanding U.S. and coalition forces in Iraq and Afghanistan. He was CIA director from September 2011 to November 2012, when he resigned after acknowledging an affair with Broadwell. He was sentenced to two years of probation and fined $100,000 for unauthorized removal and retention of classified information he shared with Broadwell.

The Associated Press contributed to this report.