AUGUSTA — A judge ruled Thursday that anger, not psychosis, drove a former patient at Riverview Psychiatric Center to attack a mental health worker at the hospital last March, leaving her beaten and bruised and with the point of a pen embedded in her hand.

Witnesses testified in October at the trial of Mark P. Murphy, 48, that Murphy apologized to Jamie Hill-Spotswood, a mental health worker, immediately before attacking her and afterward flashed the middle finger at other hospital staff members who checked on him after he was sedated. Murphy was later sent to the Maine State Prison.

Witnesses said that a day before the attack, Murphy was angry because the staff had canceled his Saturday visit to his parents’ home in Kittery, and the prosecutor maintained that anger — not mental illness — drove Murphy to attack Hill-Spotswood.

The attack occurred March 16 in the Lower Saco Unit at Riverview Psychiatric Center and touched off heightened security concerns, prompting the hospital to bring in state and county corrections officers to monitor specific patients. However, officers were stripped of stun guns and handcuffs in May after federal regulators objected to the new measures, and the county officers were gone by the end of August. The attack also triggered a federal audit of the hospital, which resulted in the loss of its eligibility for $20 million in federal money — about half of the hospital’s budget.

The state Department of Health & Human Services, which runs the hospital, continues to try to recover its Medicare provider agreement to regain that eligibility.

Justice Donald Marden, who heard the one-day, non-jury trial in Kennebec County Superior Court, referred to Murphy’s anger in the eight-page written verdict issued Thursday.

“It is clear that both immediately before and after the attack, the defendant remained angry but otherwise behaved in a rational manner,” Marden wrote.

Marden discounted a statement by Murphy made three months after the attack in which he told forensic psychologists he was concerned that he was unmarried, and decided that he wanted to be married to Hill-Spotswood. Murphy said he thought killing her would end her marriage and then he would bring her back to life and marry her.

“Even the psychiatrist opining of the lack of criminal responsibility admitted that the defendant had sufficient opportunity to create the story and such a story was inconsistent with any part of the defendant’s previous psychiatric or medical history,” Marden wrote. “In these circumstances, the court does not find the defendant’s explanation credible but simply an attempt to create some psychotic explanation for a fit of anger.”

Marden convicted Murphy of elevated aggravated assault — which carries a 30-year maximum prison term — and aggravated assault, which has a 10-year maximum prison term.

District Attorney Maeghan Maloney, whose office prosecuted the case, said Thursday that she hopes the decision sends a message.

“We will not tolerate assaults on the hard-working people at Riverview,” Maloney said.

Hill-Spotswood testified at the trial that she screamed for help that day as Murphy’s blows rained down on her.

“I curled in a fetal position and stuck my hands on top of my head, covering my face,” she said on the witness stand.

Another staff member and another patient stepped in to pull Murphy off and rescue her.

Hill-Spotswood’s husband, a registered nurse at Riverview, brought her to MaineGeneral Medical Center’s emergency room in Augusta, where she underwent surgery to remove a metal pen point from her hand and later had a subsequent surgery to remove a small plastic cylinder that also was part of the pen.

Both of those items, as well as a shattered red pen, were admitted into evidence at the trial.

Murphy’s attorney, Charles T. Ferris, maintained that Murphy was not criminally responsible for the attack because he had been growing increasingly paranoid in the weeks leading up to it.

“The reality of it, if the evidence is examined closely, is that Mark’s behaviors were increasing and escalating long before restrictions were placed on him,” Ferris said. “Unfortunately, we do have a victim who was harmed greatly, but no one is more sorry about that than Mark.”

Ferris was out of the office on Thursday and had yet to see the judge’s decision.

During the trial, the prosecutor, Deputy District Attorney Fernand LaRochelle, also described Murphy’s background, noting that he had suffered a traumatic brain injury at age 15 in an auto accident and had a history of substance abuse and assaults, including prior assaults on the staff at Riverview, one of them life-threatening.

Murphy was placed in state custody Feb. 1, 2006, after being found not criminally responsible by reason of mental disease or defect of aggravated criminal mischief. Murphy had broken into a neighbor’s home in York County in November 2004, and the homeowner shot him in the chest.

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