Congressional leaders are calling on Attorney General Eric H. Holder Jr. and FBI Director Robert S. Mueller III to explain why their agencies kept information about former CIA Director David H. Petraeus‘ extramarital affair from the White House, Congress and the U.S. intelligence community as the scandal expanded and ensnared the top U.S. commander in Afghanistan.

Lawmakers also said they intend to call on Mr. Petraeus to testify about the terrorist attack on the U.S. Consulate in Libya as soon as this week.

The Pentagon inspector general Tuesday opened an investigation of Marine Gen. John Allen after the FBI found “inappropriate” emails among tens of thousands he had sent to a Florida socialite during a cybercrime probe that uncovered Mr. Petraeus‘ affair and forced his resignation last week.

Mr. Holder knew that the FBI investigation had stumbled across evidence of Mr. Petraeus‘ affair weeks ago “but chose not to disclose it until after the presidential election — yet another example of Mr. Holder’s politicized leadership of the Justice Department,” Rep. Frank R. Wolf, Virginia Republican, said in a letter Tuesday to House Speaker John A. Boehner, Ohio Republican.

Mr. Wolf, who heads a subcommittee that funds the FBI, urged Mr. Boehner to set up a special select committee to investigate the administration’s response to the Benghazi terrorist attack, including the way officials handled the news of Mr. Petraeus‘ affair.

“There are serious questions surrounding this Justice Department’s integrity, similar to those raised during the second term of the Nixon administration,” Mr. Wolf added.

Sen. Dianne Feinstein, California Democrat and chairwoman of the Senate Select Committee on Intelligence, noted reports that, before his resignation, Mr. Petraeus had traveled to Libya to interview CIA staff about the Sept. 11 attack on the U.S. Consulate in Benghazi, in which the U.S. ambassador to Libya and three other Americans were killed.

“I want to see if that’s true or not,” Mrs. Feinstein told CNN. “There’s only one way to ascertain that, and that’s to talk to Director Petraeus and do it in a classified setting with the committee present.”

Mrs. Feinstein was one of several lawmakers visited by Mr. Petraeus‘ successor, acting CIA Director Michael J. Morell, in a series of closed-door meetings Tuesday on Capitol Hill.

“It’s only natural that acting Director Morell, who already has strong relationships on Capitol Hill, would want to reach out to members right away during this transition period,” a senior U.S. intelligence official said.

A growing scandal

Defense Secretary Leon E. Panetta asked the Pentagon inspector general to investigate Mr. Allen after the FBI uncovered as many as 30,000 pages of his emails to Florida socialite Jill Kelley, a 37-year-old married mother of three who acted as a volunteer social liaison between U.S. Central Command and the Tampa community.

A defense official said the emails included some that were “inappropriate” and “flirtatious,” but “not security-related.” Mr. Panetta asked for the investigation because not all of the emails — which date from 2010 to 2012 — have been vetted for violations of the military criminal code, the official said.

Gen. Allen has denied having an extramarital affair with Mrs. Kelley.

A senior U.S. official told The Associated Press that those who have read the exchanges between Gen. Allen and Mrs. Kelley found them to be relatively innocuous even though they might be construed as unprofessional and flirtatious.

The official said the emails included pet names such as “sweetheart” and “dear” but did not offer evidence of an affair or classified information put at risk.

In May, Mrs. Kelley, who had become friendly with Mr. Petraeus when he headed U.S. Central Command at McDill Air Force Base near Tampa, approached an FBI agent she knew about anonymous emails she received that appeared to warn her to curtail her contact with the CIA director.

The ensuing investigation, according to U.S. officials, identified Mr. Petraeus‘ biographer, Paula Broadwell, as the sender of the emails and revealed her to be having an affair with him, because they had been sharing an email account.

The two would exchange messages by leaving them in the “drafts” folder of their email, so both were logging onto the account, the AP reported.

The investigation also revealed Mrs. Kelley’s email communications with Gen. Allen.

“This thing has simple beginnings,” said former FBI Assistant Director Christopher Swecker.

He said that harassing or threatening emails referencing the director of the CIA would merit special attention.

“If it was you or me [who had received anonymous and vaguely threatening emails,] it wouldn’t get a second glance,” said Mr. Swecker. “But with a major public figure, the head of a vital agency, involved, you would at least take a look.”

He said word of the investigation “should have shot up to the assistant director level like a laser beam” once it was clear the sender of the emails was linked to Mr. Petraeus.

A career on hold

According to the AP, Mr. Holder did not learn of the investigation until late summer, months after it had begun, and did not inform anyone else in the administration until Election Day.

Spokesmen for the FBI, the White House and the Justice Department did not respond to email and phone messages seeking comment.

The FBI reportedly was producing a timeline of its investigation for lawmakers.

Mrs. Kelley had hosted parties at her Tampa mansion for Central Command officers, including Mr. Petraeus when he served there.

Gen. Allen, who is in Washington, has spoken with Army Gen. Martin E. Dempsey, chairman of the Joint Chiefs of Staff, but not Mr. Panetta, the defense official said.

Mr. Panetta announced the investigation while traveling to Australia for a ministerial meeting.

Gen. Allen had come to Washington for his Senate confirmation hearing as President Obama’s nominee for as supreme allied commander of Europe and NATO commander.

The confirmation has been postponed, according to a statement by Sen. Carl M. Levin, Michigan Democrat and chairman of the Senate Armed Services Committee, and Sen. John McCain of Arizona, the committee’s ranking Republican.

Gen. Allen is scheduled to return Saturday to Kabul, and will retain his current position as U.S. commander of the Afghanistan War.

“His leadership has been instrumental in achieving the significant progress that ISAF, working alongside our Afghan partners, has made in bringing greater security to the Afghan people and in ensuring that Afghanistan never again becomes a safe haven for terrorists. He is entitled to due process in this matter,” Mr. Panetta said in a statement Tuesday.

“The president thinks very highly of Gen. Allen and his service to the country,” White House press secretary Jay Carney told reporters at a briefing. “He has faith in Gen. Allen and believes he is doing an excellent job” in Afghanistan.

Mr. Obama nominated Gen. Joseph F. Dunford Jr. to succeed Gen. Allen in Afghanistan several weeks ago after having picked Gen. Allen for the European post. Gen. Dunford’s hearing is scheduled for Thursday.

The change of command from Gen. Allen to Gen. Dunford “is expected no earlier than March,” said the statement by Sens. Levin and McCain.

But Gen. Allen’s fate remains unknown. An inspector general investigation could take as long as six months, if not more, said an official familiar with the process.

A unit called the Investigation of Senior Officials first will decide whether there is sufficient evidence to proceed and, if so, assign a team of two to three investigators who will collect documents, identify and interview witnesses, and produce a set of findings and a general recommendation in a report to the defense secretary and members of Congress.

After reviewing the report, the defense secretary then would decide what disciplinary action should be taken, if any.

If criminal activity is uncovered during the investigation, the case could be referred to a criminal investigations body, either within the Defense Department or the FBI.

The investigation likely will extend to Afghanistan, where more witnesses and evidence may be found, said the defense official.

Gen. Allen has issued his recommendations for force levels through 2014 and beyond to the Obama administration and they are under review, Mr. Panetta told reporters Tuesday.

The international coalition in Afghanistan is expected to complete its troops drawdown by the end of 2014, leaving a residual force to conduct counterterrorism operations and continue advising and training Afghan forces.

• Susan Crabtree contributed to this report.