Julia Pierson, the first woman to hold the position as the director of the U.S. Secret Service, has officially resigned following a string of security lapses.

Homeland Security Director Jeh Johnson released a statement on Wednesday announcing Pierson's resignation. He also stated that Joseph Clancy, formerly the Special Agent in Charge of the Presidential Protective Division of the Secret Service, will step in as the interim director.

Pierson's resignation comes 18 months after President Barack Obama appointed her as the new director of the top law enforcement agency after its reputation had been tarnished by a prostitution scandal.

However, the secret service came under heavy scrutiny after an Army veteran climbed over the White House security fence and ran into the East Room with a knife on Sept. 19. The White House intruder, who has been identified as 42-year-old Omar J. Gonzalez of Copperas Cove, Texas, was eventually arrested. Officials also found 800 rounds of ammunition, two hatchets and a machete in his vehicle, which was parked nearby, reports NBC News.

Plus, it was revealed that an armed security contractor with an assault record got onto an elevator with President Obama while he was visiting Atlanta on Sept. 16, according to reports by the Washington Post.

In an interview with Bloomberg News, Pierson described her resignation as "painful," although she said "it's in the best interest of the Secret Service and the American public if I step down." She added that "Congress has lost confidence in my ability to run the agency. The media has made it clear that this is what they expected...It's painful to leave as the agency is reeling from a significant security breach."

White House press secretary Josh Earnest told reporters that the president agreed that Pierson should resign and that he called her to thank her for 30 years of service to the law.

"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," said Earnest.