AUGUSTA — The superintendent of the Riverview Psychiatric Center has been ousted after nearly five years on the job, following recent federal scrutiny that has cost the facility for the mentally ill millions of dollars in funding and highlighted concerns about how dangerous patients are subdued.

Mary Louise McEwen was out of a job as hospital superintendent Wednesday. Department of Health and Human Services Commissioner Mary Mayhew issued a statement the same day indicating McEwen was either fired or forced to resign.

In 2009 McEwen was appointed superintendent of the 92-bed Riverview, which is the state’s only hospital serving forensic patients — mentally ill people committed to the hospital by courts who have been violent or criminal.

“In evaluating where Riverview Psychiatric Center is today and our vision for the hospital moving forward, I appreciate Ms. McEwen’s years of service and wish her success in future endeavors,” Mayhew’s statement said. “I felt that a change in leadership gave us the best opportunity to achieve that vision.”

Later Wednesday, DHHS department spokesman John Martins said Dr. Brendan Kirby, Riverview’s new medical director, would take on the superintendent’s duties until an acting superintendent is appointed.

McEwen, who lives in the Bangor area, worked in mental health for more than 27 years and served in the Maine Air National Guard for 28 years. McEwen holds a bachelor’s degree in nursing and a master’s of business administration. At one point, she served as superintendent of both Riverview and the other state-operated psychiatric hospital, Dorothea Dix Psychiatric Center in Bangor, which serves non-criminal patients.

McEwen was named superintendent of Riverview after the departure of David Proffitt, who resigned in late 2008 to become president of the private Acadia Hospital in Bangor.

Riverview, which has about 80 patients and opened in 2004, has been the subject of federal scrutiny over the past year for the way it handles patients who have proved to be dangerous to the staff there, and those practices have recently cost the state about $20 million in federal funding and its federal certification. The feds first threatened to yank the funding in August, citing as a top reason the use of stun guns and handcuffs by Kennebec County corrections officers to subdue aggressive patients.

Shortly after that, state legislators passed a law to establish a mental health ward at the Maine State Prison where certain forensic patients would go for treatment. That ward at the Warren prison opened earlier this year.

On Feb. 19, McEwen addressed a legislative committee created last fall to address patient care and safety at Riverview. McEwen spoke to the panel as it discussed the opening of the intensive mental health treatment unit inside Maine State Prison. She and others said at the time that the new unit would not relieve pressures on Riverview.

McEwen gave no indication at that time she would be leaving as position. A message left on her cellphone Wednesday was not returned.

Mayhew’s statement said the department would not comment further on McEwen’s departure, but said that Riverview “will continue moving forward its efforts to reinforce a patient-centered culture that is focused on recovery, while ensuring safety for the clients, visitors and staff members.”

Helen Mulligan, a Boston-based spokeswoman for the Centers for Medicare and Medicaid Services, has said that the federal department doesn’t re-certify hospitals until the reason for termination has been removed and the hospital provides assurance that it won’t happen again.

In October, a superior court judge permitted Court Master Daniel Wathen to resume active supervision of the hospital in the aftermath of problems found by federal auditors. The court monitors the department’s progress in complying with a consent decree that settled a lawsuit brought in 1989 by mental health advocates. The consent decree holds the state mental health system to agreed-upon standards of care.

Helen Bailey, an attorney with the Disability Rights Center of Maine, which represents people treated at the mental hospital and others in that class-action lawsuit, said Wednesday that news of McEwen’s departure suggests to her that “things weren’t clicking.”

“It was reported as a leadership change, but I assume that she was let go,” Bailey said.

Bailey said she hopes Mayhew can assemble a leadership team to get the hospital re-certified by the federal government, improve staff morale, and “have patients feel like they’re valued and staff feel like they’re safe.”

“Hopefully it will be somebody who can work well with people she’s brought on board,” she said.

The hospital recently added acuity specialists who were hired specifically to work with nursing staff on maintaining a safe environment for patients and staff. The specialists were added in response to a vicious attack in March 2013 by patient Mark Murphy, who beat a mental health worker and stabbed her in the neck with a pen.

Bailey said McEwen’s departure did not come as a surprise to her, saying that the hospital has been “troubled for a long time” and “very often what happens is the top man gets changed.”

Jenna Mehnert, executive director of NAMI Maine, which advocates on behalf of individuals with mental illness and their families, would not comment Wednesday specifically on McEwen.

“Our focus is ensuring that the highest-quality services are being provided at Riverview to individuals receiving treatment,” Mehnert said.

She said the group has had concerns that the staff are not being given adequate training and resources to do that effectively.

“We hope the change in leadership will provide the opportunity for staff members and patients to get the kinds of resources that are needed,” Mehnert said. “We have concerns about what’s happening at Riverview. Not any one person is to blame; it’s really about leadership.”

Sen. Margaret Craven, D-Androscoggin, chairwoman of the Legislature’s Health and Human Services Committee, received notice about McEwen’s departure, according to House Speaker Mark Eves, D-North Berwick.

“We haven’t been briefed, nor will we be, because it is a personnel matter,” Eves said Wednesday.

He said Riverview’s series of difficulties — citing the problems identified by the Centers for Medicare & Medicaid Services — is the latest in a “host of problems of mismanagement” in the Department of Health and Human Services.

Wathen’s most recent report about Riverview, issued last week, says that the hospital will require more state funding to make up for the loss in federal aid.

Betty Adams — 621-5631 badams@centralmaine.com Twitter: @betadams