Julia Pierson resigned as Secret Service director on Wednesday after just a year and a half on the job, following a series of major security lapses that eroded President Obama’s confidence in her ability to run the agency tasked with protecting him.

Pierson’s abrupt departure — one day after Obama expressed full confidence in her — came as lawmakers from both parties were calling for her ouster after her halting performance during a House hearing Tuesday.

A decisive factor in the president’s change of heart, aides said, was that he learned only from news accounts Tuesday that a private security guard with a gun and a criminal history had not been screened before being allowed to board an elevator with him last month in Atlanta.

Earlier Tuesday, Pierson, 55, had offered a shifting and incomplete account about how an armed intruder had evaded several layers of White House security two weeks ago and made it through the front door before being tackled by an off-duty agent.

Obama “concluded new leadership of the agency was needed based on recent and accumulating accounts” of performance problems within the agency, White House press secretary Josh Earnest said Wednesday.

Pierson had been installed by Obama in March 2013 as the first female director in the agency’s 148-year history. Her appointment was aimed in part at helping the agency overcome a reputation as a boys club following a prostitution scandal the previous year.

But her tenure was rocky and included an embarrassing scandal in March when three agents were sent home from a presidential trip to Europe after one was found passed out drunk in the hallway of Obama’s hotel.

“It had to happen,” Rep. Jason Chaffetz (R-Utah), one of Pierson’s fiercest critics, said of her departure. “She lost the confidence of the men and women in the Secret Service. The situation was getting worse, not better. She wasn’t candid with Congress, nor was she sharing vital details with the president.”

Homeland Security Secretary Jeh Johnson, who accepted Pierson’s resignation, said Joseph Clancy, a longtime Secret Service veteran who retired in 2011, will replace her on an acting basis as a search for a permanent replacement is conducted.

Clancy, who has been working security in the private sector for the past three years, served as the head of Obama’s first protective detail after he took office in 2009. Clancy was described by associates as someone who understands the demands of the job and commands respect within the 6,700-person agency.

Earnest said an independent panel of security experts will conduct the search, but he did not give a timetable for a decision. The appointment does not require Senate confirmation. Former agency officials said there is no clear successor to Pierson, and some in Congress were pushing the administration to look outside the Secret Service for a replacement.

The agency faces morale problems, budget constraints and operational questions as it prepares to ramp up for a presidential campaign, during which the Secret Service traditionally bolsters its manpower to protect candidates in both political parties during a hectic travel schedule.

Homeland Security Secretary Jeh Johnson appointed Joseph Clancy, center, as interim acting director of the Secret Service. Clancy was the agent in charge of the presidential protective division before he retired in 2011. (Paul Sancya/AP)

“They will certainly consider individuals from outside that agency,” Earnest said of the search team. “They will also offer a recommendation to [Johnson] about whether or not a review of broader issues concerning the Secret Service is necessary.”

A three-decade veteran of the agency who had served as chief of staff to her predecessor, Mark Sullivan, Pierson was described upon taking the top job as a skilled and dedicated manager who had helped oversee a $250 million project to modernize the Secret Service’s communications and data-management networks.

She kept a low profile during her first year on the job but was thrust into the spotlight amid the scandals that broke this year in a series of reports in The Washington Post. The newspaper reported in May that Sullivan had pulled agents off White House patrols for at least two months in 2011 to protect a friend.

The Post also revealed last month that the Secret Service stumbled in its response to a gunman who fired at the White House from beyond the security perimeter while Obama was out of town in November 2011. It took four days for the agency to determine that bullets had struck the building, a finding that came only after a housekeeper discovered bullets on the Truman Balcony. Sasha Obama, the president’s younger daughter, was home at the time of the shooting.

The breach last month, in which Army veteran Omar J. Gonzalez leapt over the White House fence and managed to sprint through much of the mansion’s main floor, helped clinch Pierson’s downfall.

The Secret Service initially said that Gonzalez, who on Wednesday pleaded not guilty to three federal charges, was unarmed, but it was later revealed he was carrying a knife and had 800 rounds of ammunition in his car. Though the service said he had been tackled just after entering the White House, The Post revealed this week that he had in fact overpowered a Secret Service officer and made it into the East Room before being tackled by an off-duty agent near the Green Room.

“I wish to God you protected the White House like you protected your reputation here today,” Rep. Stephen F. Lynch (D-Mass.) told Pierson at Tuesday’s congressional hearing.

Pierson told lawmakers that “it is obvious that mistakes were made. I take full responsibility. What happened is unacceptable. It will never happen again.”

On Wednesday, a growing list of members of Congress from both sides of the aisle, including Sens. Charles E. Schumer (D-N.Y.) and Lindsey O. Graham (R-S.C.), called on her to resign.

Former Secret Service director Ralph Basham, who also testified at the hearing and spoke with Pierson later that evening, said she had endured “a feeding frenzy.”

“It was very difficult physically and emotionally, and it takes a toll on you,” said Basham, who oversaw the agency from 2003 to 2006. “She obviously went through a very difficult day.”

After Johnson accepted her resignation, Pierson spoke with Obama by phone and the president thanked her for her 30 years of service, White House aides said.

In the end, Basham said, the White House and Pierson recognized that the focus on her management and public performance “was becoming a distraction in terms of getting on with the investigation and doing the fact-finding.”