This story has been updated.

Homeland Security Secretary Jeh Johnson announced Wednesday that Secret Service Director Julia Pierson has offered her resignation, and he has accepted it.

"I salute her 30 years of distinguished service to the Secret Service and the nation," Johnson said in a statement.

Pierson's resignation had seemed to be only a matter of time, as a wave of embarrassing reports of security lapses from the Secret Service has become public over the last two weeks, set off by an intruder armed with a knife jumping the White House fence on Sept. 19 and making it all the way to the East Room before being stopped.

Johnson has appointed Joseph Clancy, formerly special agent in charge of the Presidential Protective Division of the Secret Service, as an interim acting director. Clancy had retired from the service in 2011. Alejandro Mayorkas, deputy secretary of Homeland Security, will take over control of the investigation into the White House security breach.

Pierson was appointed to lead the Secret Service as the organization's first female director in March, 2013. She faced an immediately tough task in helping to reform the agency's image following the 2012 prostitution scandal in Cartagena, Colombia. What's happened at her agency in the last month has been perhaps even more difficult. Pierson defended the Service and her leadership to Congress on Tuesday, despite a hostile reception from members of the House Oversight Committee over major security errors and a lack of transparency on what exactly happened.

At the White House press briefing on Wednesday, press secretary Josh Earnest said that President Obama called Pierson earlier in the day to thank her for her long service. Earnest said that Pierson offered her resignation because she felt it was in the "best interests" of the Secret Service, and that both Jeh Johnson and Obama agreed. "The president is deeply appreciative of her service," Earnest said, but he concluded that "a new direction was necessary."

Earnest said that the White House is "confident that the Department of Homeland Security will take a hard look" at how the intruder got so far into the White House, and "that we'll assemble a panel of outside experts who will take a hard look at this situation and develop a set of recommendations that will ensure that the United States Secret Service can meet the high standard they set for themselves."

In an interview with Bloomberg News after resigning, Pierson said that "it's painful to leave" while the agency is in crisis. "Congress has lost confidence in my ability to run the agency," she said. "The media has made it clear that this is what they expected."

Pierson did not sound even remotely happy to be out of the high-pressure job. "I'm disappointed that I didn't have an opportunity to implement structural and operational changes in the agency," she said to Bloomberg. "I had a vision for the future. It's 31 years of service and a firm understanding of the organization." She said that, after her meeting with Johnson earlier Wednesday, leaving felt like "the noble thing to do."

Rep. Darrell Issa, chairman of the House Oversight Committee, said in a statement that "problems at the Secret Service pre-date Ms. Pierson's tenure as director, and her resignation certainly does not resolve them." He said that his committee "will continue to examine clear and serious agency failures at the Secret Service that have been exposed."

The committee's ranking member, Rep. Elijah Cummings, D-Md., spoke with Pierson earlier Wednesday, he said in a statement, and he "absolutely respect[s] her decision" to resign.

Aside from just the security failure at the White House, the Secret Service also allowed a convicted felon with a gun onto an elevator with President Obama in Atlanta on Sept. 16. After that incident, managers at the Service told agents not to file a written report, and there was no formal review, according to the Washington Examiner.

Earnest said Wednesday that the president did not know about the elevator incident until Tuesday.

Rebecca Nelson contributed to this article.