Nancy Messonnier, a senior health expert at the Centers for Disease Control and Prevention who was the first U.S. official to warn Americans last year that a new coronavirus would upend their lives, is resigning from the agency, she told colleagues in an email Friday morning.

Her last day is May 14. She will become an executive director at a California health philanthropy.

“My family and I have determined that now is the best time for me to transition to a new phase of my career,” she wrote in the email reviewed by The Washington Post. “CDC has provided me many meaningful, rewarding, and challenging opportunities to grow intellectually and mature as a public health leader.”

A respected respiratory disease expert, Messonnier saluted the agency for its response to the pandemic, writing, “we achieved incredible things, including deploying multiple vaccines in under one year and building the information infrastructure to provide real-time vaccination coverage and vaccine safety data.”

Messonnier, who has been director of the CDC’s National Center for Immunization and Respiratory Diseases since 2016, did not respond to a request for comment. During a Friday briefing, CDC director Rochelle Walensky called Messonnier a “true hero” but offered no explanation for her exit amid the most ambitious immunization campaign in American history.

“I want to wish her the best in her future endeavors, and I have no other comment,” Walensky said.

The Friday announcement marked an attempt by CDC leaders to let Messonnier leave on her own terms, according to agency officials familiar with the situation, after she was replaced last month as head of the agency’s vaccine task force. The irony of her departure’s timing was not lost on agency officials, even as they strained to understand the reasons for the abrupt shake-up.

Messonnier survived then-President Donald Trump’s wrath after she contradicted the White House’s reassuring message last year and warned in a now-famous Feb. 25, 2020, announcement that the United States should prepare for an unprecedented health crisis.

“It’s not a question of if this will happen, but when this will happen, and how many people in this country will have severe illnesses,” she said at the time. “Disruptions to everyday life may be severe, but people might want to start thinking about that now.”

Her comments sent stocks plunging, and Trump became enraged, directing aides to walk back her prognostication and repeatedly asking them to fire her, according to multiple former senior administration officials. After participating in public briefings in late 2019 and early 2020, she was pulled from the spotlight. For the remainder of the year, she reemerged only intermittently to give public remarks, including last December as the first authorized vaccines were shipped throughout the country.

During the presidential campaign, aides to then-candidate Joe Biden singled out Messonnier by name to fault Trump for his handling of the outbreak.

“Starting the next day, Dr. Messonnier no longer appeared at public briefings of the White House coronavirus task force. The president and the White House sent a clear message to scientists in the government: There would be a price for speaking out and speaking up,” Ron Klain, a longtime Biden aide now serving as White House chief of staff, said in a campaign video.

Ultimately, the career health official left not because of political pressure but because of lack of support from top CDC leaders, two agency officials said, speaking on the condition of anonymity to describe internal matters. Rather than reassigning her to a lower-profile role, she was given time to find another job after being replaced last month as head of the agency’s vaccine task force — part of a broader reorganization of that unit under Walensky.

Messonnier had set up the task force independently from the CDC’s emergency operations center’s incident command structure, an arrangement that gave her more control over its activities, according to a senior CDC official. The task force, which helped steer the halting early rollout of shots, was recently absorbed into the agency’s broader response, as Walensky also brought on a senior official overseeing vaccine equity who reports directly to her.

Meanwhile, Messonnier stopped attending meetings, multiple agency officials said, and Walensky told staff on April 21 that Messonnier “is taking some well deserved leave for at least the next month.”

“She has disappeared off the face of the Earth,” one official said last month, speaking on the condition of anonymity because of the matter’s sensitivity.

Messonnier joined the CDC in 1995 as an epidemic intelligence service officer. She has held a variety of leadership roles.

On the vaccine task force, Messonnier was viewed as knowledgeable and experienced, especially in addressing the needs of state and local health officers, according to multiple people involved in the federal response who spoke on the condition of anonymity because they lacked authorization to speak publicly. Some also said she could be dismissive and unyielding, and she periodically became embroiled in heated arguments with officials from other agencies brought in to assist with the vaccination campaign.

She was known for being plain-spoken. Last year, in a meeting with Gustave F. Perna, the four-star Army general leading the logistics of the vaccination drive, she questioned him about some aspects of the rollout. After the meeting, one of his aides chastised her and said, “That’s not how you talk to a four-star general,” according to a federal health official who recounted the conversation. A Defense Department spokeswoman, Tara Clements, said she was not aware of any such incident.

Messonnier wrote in her Friday email that she would become executive director for pandemic and public health systems at the Skoll Foundation, in Palo Alto, Calif. The foundation was founded in 1999 by Jeff Skoll, the first president of eBay.

In her email, she told colleagues her new position in the private sector would keep her involved in public health issues.

“Thank you for your support and for your continued efforts to save lives and protect people,” she concluded. “It has been an honor to work with you.”

Yasmeen Abutaleb and Amy Goldstein contributed to this report.