Eric Holder, the head of the Justice Department, was reportedly told in the late summer that FBI agents were investigating the former CIA director's sexual relationship with Paula Broadwell, his biographer.

However, the information was kept inside the Justice Department until the day of the presidential election, when officials informed James Clapper, the Director of National Intelligence, who immediately urged Gen Petraeus to resign.

The decision not to inform Congress or the White House of the investigation - even though Gen Petraeus had already been interviewed by FBI agents and classified information had been found on Mrs Broadwell's laptop - raises further questions about timing of the abrupt resignation.

Representative Peter King, a Republican who sits on the House intelligence committee, said the FBI had been "derelict in its duty" by not immediately informing the White House that Gen Petraeus was under investigation.

"Once the FBI realized that it was investigating the director of the CIA or the CIA director had come within its focus or its scope, I believe at that time they had an absolute obligation to tell the president," Mr King told MSNBC.

Neither the FBI nor the Justice Department has officially commented on the decision not to inform Mr Obama of the investigation into one of the core members of his national security team.

Paula Broadwell, left, allegedly sent Jill Kelley threatening emails about Gen Petraeus, right

However, in private briefings the FBI insisted it was under no obligation to pass on the information because it had already determined that there was no breach of national security and no crime had been committed.

Senator Dianne Feinstein, the Democrat chair of the powerful Senate intelligence committee, said on Sunday that she would investigate the FBI's decision to sit on the information.

"We will investigate why the committee didn’t know,” Mrs Feinstein said. “We should have been told.”

Mrs Broadwell was interviewed by the FBI at least twice, according to the Wall Street Journal, and during her first interview handed over a laptop containing classified documents. Their content is not known.

Both Mrs Broadwell and Gen Petraeus admitted the affair in interviews with the FBI but both denied that he was the source of the classified information.