Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Julia Pierson, the director of the Secret Service, resigned Wednesday after a series of embarrassing security lapses, including a breach of the White House by a knife-wielding intruder and the revelation that an armed man came within inches of President Barack Obama in an elevator.

Pierson stepped down one day after she was hauled before a House committee and upbraided by lawmakers, including one who suggested that she was better at protecting her own reputation than the executive mansion.

“Over the last several days, we’ve seen recent and accumulating reports raising questions about the performance of the agency, and the president concluded that new leadership of that agency was required,” White House press secretary Josh Earnest told reporters.

Obama called Pierson to thank her for 30 years of service to the agency, the press secretary said.

Homeland Security Secretary Jeh Johnson named Joseph Clancy, formerly the service’s special agent in charge of the presidential protective division, as interim replacement. Clancy retired three years ago and is director of corporate security for Comcast, which owns NBCUniversal.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Pierson, 55, was appointed to the top job in part because of missteps under her predecessor, including a prostitution scandal involving a team of agents sent to Colombia to prepare for a presidential visit. But her own tenure came to a quick end after details of the recent breaches came to light.

On Sept. 16, while Obama was visiting Atlanta to talk about Ebola at the Centers for Disease Control and Prevention, an armed security contractor with an assault record got onto an elevator with the president, according to a report in The Washington Post.

The man started recording video of Obama on his cellphone and did not stop when agents told him to, The Post reported. Earnest said that the White House only learned the details of that encounter on Tuesday, shortly before they became public.

And on Sept. 19, a man with a knife jumped the White House fence, raced across the lawn, entered the building and made it as far as the East Room before he was tackled, and only then by an off-duty agent.

The Secret Service, in its first account of the episode, said only that the man was apprehended after entering the North Portico doors.

After the hearing, Pierson quickly lost support in Congress. Rep. Jason Chaffetz, R-Utah, called for her resignation, and a leading Democrat, Rep. Elijah Cummings, said he was so disturbed he couldn’t sleep.

Johnson, in announcing Pierson’s resignation on Wednesday, ordered an independent review of the fence-jumping intrusion. He invited the independent panel that will conduct the review to submit names for Pierson’s permanent replacement, including people from outside the Secret Service.

IN-DEPTH

— Erin McClam