The head of the Maryland Department of Health office charged with inspecting nursing homes and investigating complaints will leave her role next week, the health department said in a news release Thursday.

Dr. Tricia Nay, who joined the Office of Health Care Quality in 2008 and has been its executive director since 2014, will resign effective June 27, the department said. The search for her replacement, a nationwide process, is expected to take several months.

Her resignation comes a month after five nursing home residents with mobility impairments and complex health needs filed a class action lawsuit against the health department, accusing it of failing in its duty to regularly inspect nursing homes in the state and allowing dangerously poor quality care to go undetected.

According to the lawsuit, while the state health department is required to conduct annual inspections of its 225 licensed nursing facilities that care for people on Medicaid or Medicare, more than 100 facilities have gone four years without an inspection. The lawsuit also accused the state of allowing a backlog of uninvestigated complaints from nursing home residents to balloon, causing some residents to wait months or even years for the department to look into complaints that they were harmed by abuse or neglect.

Chase Cook, a spokesman for the health department, declined to comment on whether Nay’s resignation is related to the lawsuit.

While the state conducts its search for Nay’s replacement, Dr. Nilesh Kalyanaraman — deputy secretary of public health services — will serve as Nay’s interim replacement.

“We are committed to finding a highly qualified health care quality expert to lead this critical office,” Maryland Health Secretary Dr. Laura Herrera Scott said in the release.

“Marylanders expect our regulated health care providers to provide high quality care to our patients, especially those who are most vulnerable.”

In the news release, the health department said the Office of Health Care Quality’s critical roles — such as nursing home surveys, health care licensure and complaint investigation — will continue while it searches for Nay’s replacement. Health department leaders are “actively analyzing” ways to improve processes in the office, the release said.

“There is much work to be done within the Office of Health Care Quality,” Kalyanaraman said in the release. “Since the pandemic, health care services across the country have struggled as they reel from staffing setbacks and other challenges. The Department will hire leadership that builds trust and maintains Maryland’s strict standards for quality care.”