AUGUSTA — A husky that had received a pardon from Gov. Paul LePage after being ordered put down for killing another dog in Waterville won an official reprieve from the euthanasia order in a deal brokered by nine lawyers Monday.

Dakota, the 4-year-old husky whose court-ordered death sentence had been in legal limbo, will live, at least initially, at a veterinary hospital in Maine with a boarding kennel and be trained by a canine behavior expert, following the settlement approved by Judge Valerie Stanfill in Augusta District Court.

It’s not clear whether LePage’s pardon order had any bearing on the settlement.

The location of the facility and identity of the trainer were kept secret by Kennebec County District Attorney Maeghan Maloney and defense attorney Darrick Banda, both of whom said the hospital and trainer asked for anonymity. The agreement also stipulates that Dakota remains outside Kennebec County initially and permanently out of Waterville, and requires that she remains tethered and kept in a secure enclosure.

A previous agreement to have Dakota placed with a New Hampshire rescue group for training as a sled dog was derailed after one of the attorneys objected to it, Banda said.

“Hopefully, everybody can ride off into the sunset and Dakota can live for another day,” Banda said before the court hearing.

Matthew D. Perry, Dakota’s original owner, attended Monday’s hearing and called the settlement “the best agreement that could possibly be made.” Perry had owned Dakota for five years, raising her from a puppy, he said.

“I’m happy with it; I believe everybody’s happy with it,” he said.

The compromise appears to bring to a close a 14-month saga that started when Dakota escaped from the yard where Perry kept her and killed another dog in Waterville. Then in February of this year, Dakota escaped again and seriously injured another dog owned by the same family. The case drew the attention of LePage, who issued a documented “pardon” to Dakota that was appealed to the Maine Supreme Judicial Court, and raised questions about the appropriate punishment for dogs deemed dangerous.

Banda said he and attorney David Bobrow helped broker a deal to get attorneys for all the parties involved on board. Nine lawyers went into chambers – including two representing LePage – to discuss the case with the judge before the hearing at the Capital Judicial Center.

Dakota remained at the Humane Society Waterville Area on Monday.

District Attorney Maeghan Maloney speaks about the compromise and ruling that spared the life of a dog named Dakota following a court ruling at the Capital Judicial Center in Augusta on Monday. Staff photo by David Leaming

Maloney said the neighbor whose dogs were attacked was in agreement with the settlement but wanted Dakota kept out of Waterville permanently. The neighbor, who was not named in the complaint, was not at the hearing Monday.

“We have an agreement that this is in the best interest of the public and in the best interest of Dakota as it is something that all parties would like to see happen,” Maloney said.

LePage had issued a “pardon” for Dakota after learning about the dog from a board member of the Waterville shelter. There was only a brief mention of the pardon at the hearing on Monday when Stanfill asked whether a pending motion to intervene filed by LePage was being withdrawn.

“Yes, it is your honor,” said Catherine Connors, who was representing LePage. Brent Davis, governor’s counsel, was in the courtroom as well.

In a letter sent to Maine Attorney General Janet Mills, LePage had earlier indicated he wanted to defend his full power to grant pardons, including in Dakota’s case.

Judge Valerie Stanfill ruled that Dakota the dog will not be euthanized and instead be relocated outside of Kennebec County to a training center following a court ruling at the Capital Judicial Center in Augusta on Monday. Staff photo by David Leaming

The settlement also appears to stop the case from an appeal before the Maine Supreme Judicial Court. It also says a separate dog behavioral expert would have to evaluate Dakota before any adoption.

Dakota, now 5, was declared a dangerous dog in May 2016 after getting loose and killing Zoe, a smaller dog belonging to the neighbor.

At that time, Dakota’s owner, Perry, was ordered to keep Dakota confined, but Dakota got loose again in February. The dog went back to the same neighbors’ house, attacking their new dog, Bruce Wayne, and biting his throat, Maloney said.

Dakota was picked up as a stray and taken to the humane society, which said the dog did well on aggression tests and was a “model resident” at the shelter.

Dakota was adopted by Linda Janeski of Winslow, who previously identified herself as the mother of Perry’s ex-girlfriend.

Janeski indicated she was unaware of a March 21 court hearing in which Stanfill found that Perry had committed the civil offense of “keeping a dangerous dog” and ordered Dakota euthanized within 48 hours. A series of court postponements helped keep that death sentence at bay.

Perry, 37, was in court Monday, sitting at the defense table with Banda and Bobrow. Perry withdrew his admission to the prior civil violation and admitted to a lesser one that does not include a reference to the earlier attack on Zoe. He was fined $250.

“I do not mind paying a fine to make sure Dakota stays alive,” Perry said after the hearing.

Banda explained, “When you take the prior attack away, it takes the mandatory euthanasia away.”

Janeski stood in court to say she had agreed to the settlement as well. She was accompanied by her attorneys, Jeffrey Edwards and Bonnie Martinolich.

Edwards said the agreement on sparing Dakota would give everyone peace of mind.

“She’s a great dog and she’ll just be a better dog,” Martinolich said.