CIA director David Petraeus has resigned from his post, admitting he had an extra-marital affair. Announcing his decision to stand down, the former general was full of contrition. "After being married for over 37 years, I showed extremely poor judgment by engaging in an extra-marital affair," Mr Petraeus said in a statement. "Such behaviour is unacceptable, both as a husband and as the leader of an organisation such as ours. This afternoon, the president graciously accepted my resignation." Mr Petraeus became CIA boss in 2011 after heading international forces in Iraq and later in Afghanistan. He was the highest-profile military officer of the post-9/11 years, winning plaudits for his role running the "surge" in Iraq and implementing a counter-insurgency strategy in Afghanistan. He left his command role in Afghanistan in mid-2011, resigning from the US Army to head the CIA after Leon Panetta became defence secretary. Shortly after Mr Petraeus resigned, reports emerged that the FBI had uncovered the affair during the course of an investigation into Mrs Broadwell. The FBI was monitoring Mr Petraeus' email account to check whether Mrs Broadwell had access to it, administration officials were quoted as saying by the Associated Press. Mr Obama's statement said Mr Petraeus had "provided extraordinary service to the United States for decades", citing both his time as CIA director and service to the military. "By any measure, through his lifetime of service David Petraeus has made our country safer and stronger." "Going forward, my thoughts and prayers are with Dave and Holly Petraeus, who has done so much to help military families through her own work." Senior Obama advisor David Axelrod said the president had not known about the Petraeus issue during the campaign, and that the former general had come to Mr Obama after the election to offer his resignation CIA director David Petraeus has resigned from his post, admitting he had an extra-marital affair. Announcing his decision to stand down, the former general was full of contrition. "After being married for over 37 years, I showed extremely poor judgment by engaging in an extra-marital affair," Mr Petraeus said in a statement. "Such behaviour is unacceptable, both as a husband and as the leader of an organisation such as ours. This afternoon, the president graciously accepted my resignation." Mr Petraeus became CIA boss in 2011 after heading international forces in Iraq and later in Afghanistan. He was the highest-profile military officer of the post-9/11 years, winning plaudits for his role running the "surge" in Iraq and implementing a counter-insurgency strategy in Afghanistan. He left his command role in Afghanistan in mid-2011, resigning from the US Army to head the CIA after Leon Panetta became defence secretary. Shortly after Mr Petraeus resigned, reports emerged that the FBI had uncovered the affair during the course of an investigation into Mrs Broadwell. The FBI was monitoring Mr Petraeus' email account to check whether Mrs Broadwell had access to it, administration officials were quoted as saying by the Associated Press. Mr Obama's statement said Mr Petraeus had "provided extraordinary service to the United States for decades", citing both his time as CIA director and service to the military. "By any measure, through his lifetime of service David Petraeus has made our country safer and stronger." "Going forward, my thoughts and prayers are with Dave and Holly Petraeus, who has done so much to help military families through her own work." Senior Obama advisor David Axelrod said the president had not known about the Petraeus issue during the campaign, and that the former general had come to Mr Obama after the election to offer his resignation