WASHINGTON — Responding warily to his administration’s sudden sex scandal, President Barack Obama said Wednesday he’s seen no evidence that national security was damaged by the revelations that ended his CIA director’s career and imperil that of his Afghan war commander.

But the president said he is reserving judgment about how the FBI has handled the investigation that began in the summer but didn’t reach his desk until after last week’s election.

“I have a lot of confidence, generally, in the FBI,” Obama said, qualifying his words of support for the agency and its actions in the case.

As Obama spoke about the scandal from the White House, legislators on Capitol Hill were grilling FBI and CIA officials privately about the same issues: whether national security was jeopardized by the case and why they didn’t know about the investigation sooner.

“I have no evidence at this point, from what I’ve seen, that classified information was disclosed that in any way would have had a negative impact on our national security,” Obama said at his first postelection news conference.

As for the FBI’s handling of the matter, Obama said: “My expectation is that they follow the protocols that they’ve already established. One of the challenges here is that we’re not supposed to meddle in criminal investigations, and that’s been our practice.”

Federal law enforcement officials have said the FBI didn’t inform the White House and Congress sooner about the original investigation because of rules set up after the Watergate scandal to prevent interference in criminal investigations and that lawmakers weren’t given notice of potential national security problems because the bureau had quickly resolved them.

CIA Director David Petraeus resigned Friday, two days after the White House was notified that he’d acknowledged having an affair with his biographer, Paula Broadwell.

The FBI’s investigation began last summer when Tampa, Fla., socialite Jill Kelley turned over anonymous emails that had been sent to her and Gen. John Allen, the top U.S. commander in Afghanistan. The first anonymous email was sent to Allen in May, under the pseudonym “Kelleypatrol,” and he forwarded it to Kelley. That email warned Allen to stay away from Kelley, according to a person close to Kelley who spoke on condition of anonymity. That same email — later traced to Broadwell — said the writer knew about a future meeting Allen and Kelley had scheduled.

Kelley was a friend of Allen and Petraeus. Kelley’s complaints about the threatening emails triggered the FBI investigation that led to the resignation of Petraeus and the inquiry into her communications with Allen. Officials said Broadwell apparently saw Kelley as a rival for Petraeus’ affections.

The official also said Wednesday that Broadwell sent emails to a couple of other senior military officials besides Petraeus and Allen. The official characterized the emails as an attempt to undermine Kelley’s reputation.

The FBI found classified documents on Broadwell’s computer. On Monday, the FBI also found classified documents in the search of Broadwell’s house in Charlotte, the official said.

In early June, Kelley received the first email sent from different anonymous accounts alleging she was up to no good, the person close to Kelley said. By the end of June or early July, Kelley contacted an FBI agent in Tampa, which began the agency’s investigation. The agent’s name is Frederick W. Humphries, 47, a veteran counterterrorism investigator in the Tampa office. The FBI is reviewing Humphries’ conduct in this case, a federal law enforcement official said Wednesday.