Image caption The accused was an agent of the Federal Bureau of Investigation for 25 years

An ex-FBI agent has agreed to plead guilty to leaking information to a reporter about an al-Qaeda bomb plot and to child pornography charges.

Donald Sachtleben, 55, is to be sentenced to 12 years in prison.

The May 2012 disclosures jeopardised an international intelligence operation and put lives at risk, officials said.

Investigators identified him after seizing phone records of the Associated Press, which published an article on the Yemen-based al-Qaeda plot.

"This unauthorized and unjustifiable disclosure severely jeopardized national security and put lives at risk," Deputy Attorney General James Cole said in a statement.

"To keep the country safe, the department must enforce the law against such critical and dangerous leaks, while respecting the important role of the press."

In May 2012, the Associated Press published an article describing a successful effort to disrupt a plot by Yemen-based al-Qaeda militants to bomb a US-bound airliner.

In court documents, Sachtleben of Indiana admitted giving a reporter information on a plot matching that description.

US Attorney General Eric Holder called the national security disclosure among the most serious he had ever seen.

"It put the American people at risk, and that is not hyperbole," he told reporters in May.

The Associated Press declined to comment on its relationship with Sachtleben, but reported he had pleaded guilty "to revealing secret information for an Associated Press story".

Sachtleben worked for the FBI as a bomb technician from 1983-2008 and held top secret security clearance.

Stored secrets

In 2008, he was rehired as a contractor, maintaining his security clearance and continuing to have access to classified defence information, according to court documents.

On 2 May 2012, he disclosed secret information to a reporter, according to a court document he signed.

Nine days later he was arrested on separate charges of trading images of child pornography online, having been identified during an investigation into another man accused of possession of child pornography.

An FBI search of Sachtleben's computer, seized in the child pornography investigation, revealed improperly stored secret documents, according to court records.

On Monday, Sachtleben pleaded guilty to unauthorised disclosure of national defence information, unauthorised possession and retention of national defence information, and two charges of distributing and possessing child pornography.

The plea agreement calls for him to be sentenced to a total of 140 months in prison - 43 for the national security offenses and 97 for the child pornography charges.