The outgoing head of the Centers for Disease Control and Prevention said Tuesday her reasons for stepping down were complicated, driven in part by a desire to take a break from the frenetic pace of the job during a pandemic.

Dr. Rochelle Walensky surprised many in public health circles last month by announcing her departure after two years and five months — one of the shortest tenures for a CDC director in recent decades. She resigned as the pandemic's national public health emergency was winding down.

"I did what I came to do — which was get us through the darkest days of a pandemic," she said in an interview with The Associated Press.

Walensky, 54, described her time at the agency as intense, but stopped short of saying she was burned out. She said she had looked for a quiet moment to withdraw from a job that gave her a sense of pride and accomplishment but also led to criticism, protests outside her home and threats of violence.

"That (the threats) wasn't the straw that broke the camel's back," she emphasized. But it also wasn't something she expected when she took the job — her first time running a government public health agency.

"I never expected that when I am trying to run to be an aid to somebody, that they would actually be turned off by my very existence," Walensky added.

She spent the first year of the pandemic treating COVID-19 patients as an infectious disease doctor at Massachusetts General Hospital.

She became CDC director in January 2021, on the first day of the Biden administration. It was near the beginning of a national COVID-19 vaccination campaign that was expected to turn the tide, but saw additional waves of illness and death as new versions of the coronavirus emerged.

There were also a variety of other outbreaks and crises, including an unexpected mpox outbreak last year.

Counting her time at Massachusetts General during the pandemic, "it was 3 1/2 years at that pace — an extraordinary pace," she said.

Walensky's last day at CDC is June 30. She does not have a new job or other role lined up, she said, saying she wanted to spend some time with her family, living at a slower pace.

At CDC, she has taken fire, mainly — but not only — from Republican legislators and critics of vaccination and masking campaigns. That was on display last week, when a GOP-led congressional subcommittee questioned and criticized Walensky about her tenure and accused her of misleading the public.

"Your leadership has fractured the American public's confidence in the CDC," said Rep. John Joyce, R-Pa.

But she was also cheered by other legislators, mostly Democrats, who said she helped safely reopen schools, promote lifesaving vaccinations and build up the agency's ability to forecast new outbreaks.

Walensky herself has acknowledged problems during her tenure. One example: In the spring of 2021, early in her tenure, Walensky said fully vaccinated people could stop wearing masks in many settings, only to reverse course as the then-new delta variant spread.

But the initial statement was perceived by many as an attempt to "game us or push us (into getting vaccinated) in ways that were not quite fair," said Gil Eyal, a Columbia University sociology professor who studies the mistrust of experts.

Walensky said she was extremely proud of what the CDC and other public health workers had accomplished in the last couple of years, citing the 676 million doses of COVID-19 vaccine given to Americans. She also initiated a reorganization of the 12,000-employee health agency in Atlanta.

Last week, the White House announced it had chosen Dr. Mandy Cohen, a former North Carolina health official, to be the next CDC director.

Walensky said she has known Cohen for years and has had several conversations recently about the job and the challenges ahead.

Jeff Levi, professor of public health policy and management at George Washington University, said her earlier-than-expected departure from the job is understandable.

"She walked into a horrible situation and 2½ years in a job like this, with this intensity of both the public health and political pressures, is an immense amount of time," Levi said. "She is totally entitled to want to be moving on."