A former FBI agent has agreed to plead guilty to leaking secret government information about a bomb plot to a news agency, a leak that Attorney General Eric Holder called one of the most serious in US history, the Justice Department said on Monday.

As part of a plea agreement filed in US District Court in Indiana, Donald John Sachtleben agreed to a prison sentence of three years and seven months for the leak in addition to a separate sentence for unrelated child pornography charges, the department said.

A lawyer for Sachtleben, 55, of Carmel, Indiana, did not immediately respond to a request for comment.

A story by the Associated Press (AP) in May 2012 described a US operation in Yemen to foil a plot to bomb an airliner.

The AP said it delayed publishing the story at the request of government officials until security concerns were allayed, but US officials said the leak compromised a US agent working to undermine the armed group al-Qaeda in the Arabian Peninsula.

Two months later, Attorney General Eric Holder appointed a senior prosecutor to lead an investigation.

Sachtleben retired from the FBI in 2008, after about 25 years, according to the Justice Department. He continued to work on contract as a bomb analyst.

According to a copy of a plea agreement dated September 6 and released on Monday, Sachtleben agreed to plead guilty to one count of unauthorised disclosure of national defence information and one count of unauthorised possession and retention of national defence information.

If accepted by a judge, the prison sentence would be the longest ever handed down in a civilian court for a leak of classified information to a reporter.