WASHINGTON (AP) — The director of the Secret Service said Tuesday she is resigning following the assassination attempt against former President Donald Trump that unleashed intensifying outcry about how the agency tasked with protecting current and former presidents could fail in its core mission.

Kimberly Cheatle, who had served as Secret Service director since August 2022, had been facing growing calls to resign and several investigations into how the shooter was able to get so close to the Republican presidential nominee at an outdoor campaign rally in Pennsylvania.

“I take full responsibility for the security lapse,” she said in the email to staff Tuesday. “In light of recent events, it is with a heavy heart that I have made the difficult decision to step down as your director.”

Kimberly Cheatle, Director, U.S. Secret Service, testifies during a House Committee on Oversight and Accountability hearing on Oversight of the U.S. Secret Service and the Attempted Assassination of President Donald J. Trump, on Capitol Hill, Monday, July 22, 2024, in Washington. (AP Photo/Rod Lamkey, Jr.)

Cheatle’s departure was unlikely to end the scrutiny of the long-troubled agency after the failures of July 13, and it comes at a critical juncture ahead of the Democratic National Convention and a busy presidential campaign season. Lawmakers on both sides of the aisle have promised continued investigation, along with an inspector general probe and an independent and bipartisan effort launched at President Joe Biden’s behest that will keep the agency in the spotlight.

“The scrutiny over the last week has been intense and will continue to remain as our operational tempo increases,” Cheatle said in her note to staff.

Cheatle’s resignation comes a day after appeared before a congressional committee and was berated for hours by both Democrats and Republicans for the security failures. She called the attempt on Trump’s life the Secret Service’s “most significant operational failure” in decades and said she took full responsibility for the security lapses, but she angered lawmakers by failing to answer specific questions about the investigation.

At the hearing Monday, Cheatle remained defiant that she was the “right person” to lead the Secret Service, even as she said she took responsibility the security failures. When Republican Rep. Nancy Mace suggested Cheatle begin drafting her resignation letter from the hearing room, Cheatle responded, “No, thank you.”

The 20-year-old shooter, Thomas Matthew Crooks, was able to get within 135 meters of the stage where the former president was speaking when he opened fire. That’s despite a threat on Trump’s life from Iran leading to additional security for the former president in the days before the July 13 rally.

Cheatle acknowledged Monday that the Secret Service was told about a suspicious person two to five times before the shooting at the rally. She also revealed that the roof from which Crooks opened fire had been identified as a potential vulnerability days before the rally. But she failed to answer many questions about what happened, including why there were no agents stationed on the roof.

A bloodied Trump was quickly escorted off the stage by Secret Service agents, and agency snipers killed the shooter. Trump said the upper part of his right ear was pierced in the shooting. One rallygoer was killed, and two others were critically wounded.

“The assassination attempt on former President Donald Trump on July 13th is the most significant operational failure at the Secret Service in decades,” Cheatle told members of the House Oversight and Accountability Committee. “As the Director of the United States Secret Service, I take full responsibility for any security lapse.”

Details continue to unfold about signs of trouble that day and what role both the Secret Service and local authorities played in security. The agency routinely relies on local law enforcement to secure the perimeter of events where the people it is protecting appear. Former top Secret Service agents said the gunman should never have been allowed to gain access to the roof.

Two days after the shooting, Homeland Security Secretary Alejandro Mayorkas said he supported Cheatle “100%.”

But there were calls for accountability across the political spectrum, with congressional committees immediately moving to investigate, issuing a subpoena to testify and the top Republican leaders from both the House and the Senate saying she should step down. Biden, a Democrat, ordered an independent review into security at the rally, and the Secret Service’s inspector general opened an investigation. The agency is also reviewing its counter sniper team’s “preparedness and operations.”

In an interview with ABC News two days after the shooting, Cheatle said she wasn’t resigning. She called the shooting “unacceptable” and something that no Secret Service agent wants to happen. She said her agency is responsible for the former president’s protection: “The buck stops with me. I am the director of the Secret Service.”

Cheatle served in the Secret Service for 27 years. She left in 2021 for a job as a security executive at PepsiCo before Biden asked her to return in 2022 to head the agency with a workforce of 7,800 special agents, uniformed officers and other staff.

She took over amid a controversy over missing text messages from around the time thousands of Trump supporters stormed the U.S. Capitol on Jan. 6, 2021, following his 2020 election loss to Biden.

During her time in the agency, Cheatle was the first woman to be named assistant director of protective operations, the division that provides protection to the president and other dignitaries, where she oversaw a $133.5 million budget. She is the second woman to lead the agency.

When Biden announced Cheatle’s appointment, he said she had served on his detail when he was vice president and he and his wife “came to trust her judgment and counsel.”