NEW YORK (WABC) -- New York City's Health Commissioner is resigning and leaving New York City for a new job.

Dr. Mary Bassett has been with Mayor Bill de Blasio's administration since he was elected mayor, but the mayor announced Thursday she is leaving for a job at Harvard University.

Bassett will continue to serve as health commissioner through the end of August.

"Dr. Bassett brought equity to the forefront of public health in New York City," de Blasio said. "She led the push to bring health centers to under-served neighborhoods and helped ensure New Yorkers struggling with opioid addiction received the care they needed. Her approach to public health is helping make New York City a better, fairer and more just city."

She will serve as the director of the Franois-Xavier Bagnoud Center for Health and Human Rights. She will also be appointed the Franois-Xavier Bagnoud Professor of the Practice of Health and Human Rights in the department of Social and Behavioral Science at the School.

"It was an honor to see someone with so much expertise in health and medicine up close in action, and I learned a lot in that time. I know she will do great work at Harvard University and I look forward to working with First Deputy Commissioner Barbot on the city's health concerns," Council Speaker Corey Johnson said.

First Deputy Commissioner Oxiris Barbot will serve as acting commissioner.