GRAND RAPIDS, Mich. (WOOD) — The man charged with shooting at a Grand Rapids police officer and repeatedly stabbing a police dog during a standoff on Sunday has a history of mental illness.

His family told News 8 Terry Junior Warren had been in a standoff with Grand Rapids police earlier this year. Warren, 24, of Grand Rapids, also was on parole from the Michigan Department of Corrections at the time of Sunday’s standoff.

Warren was arraigned Wednesday in Grand Rapids District Court on 17 felony charges ranging from the attempted murder of a police officer to seriously injuring a police dog, along with weapons charges. He is being held in the Kent County jail without bond.

Court records show his family has tried to get him mental help. They got him involuntarily committed to the Pine Rest Christian Mental Health Services hospital twice in the last four years. The last time, in May, they said, was after Grand Rapids police encountered him during a short standoff at his home on the city’s northeast side.

Warren was diagnosed with bipolar disorder with psychosis, Kent County Probate Court records show.

“Patient was admitted to the hospital with psychosis,” a petition filed in May reads in part. “He has been hearing the voices of his deceased parents. He is hyper religious and focused on his Native American heritage. He thinks he is God’s son.”

“States his visions are telling him to kill the people who assaulted him,” report from March 2018 says.

“When he’s in compliance and taking his medication, he’s a completely different person than when he’s not,” said John Stecco, the attorney appointed to represent Warren for Wednesday’s arraignment.

Records show Warren was ordered to Pine Rest for up to 60 days in May after his first standoff with police. His sister, who didn’t want to be named, said he spent two weeks at Pine Rest. Instead of blaming the system, though, she blamed her brother for refusing to take his medication.

The sister thanked Grand Rapids police for how officers have treated her brother.

The standoff started Sunday evening as police were looking for Warren, who was wanted for an assault that happened the previous day. Records show that assault involved an attempt to strangle a woman.

The Grand Rapids Police Department says Warren holed up in a home on Leonard Street NW near Walker Avenue, refused to give himself up and repeatedly fired gunshots, though no one was hit.

A woman who lives a block away told News 8 that the suspect had knocked on her door just before the standoff. The stranger pushed his way into her home, told her son, “I love you,” then ran away when he was told to leave, the woman said.

A man who lives across the street on Leonard said he has known Warren since high school but says Warren didn’t live there.

“Just a kid who never got it right, you know,” the neighbor, Kvng Marnar, said.

In the early hours of Monday, GRPD tried tear gas and then sent in the dog, Eli.

“It’s a difficult decision to send in a K9 knowing that harm may come to the dog, but when you have an armed suspect that is showing no signs of surrender, it can rapidly escalate into a use of deadly force,” GRPD Chief Eric Winstrom said in a Wednesday statement. “Choosing to use a police K9 is a less lethal way to gain control and bring a stand-off to a peaceful end.”

Police say Warren stabbed the dog eight times, seriously injuring him. Eli bit Warren and police said the dog did not back down even after being stabbed. Warren was then arrested.

K-9 ELI RELEASED FROM HOSPITAL: ‘TRULY A MIRACLE’

Around 4 p.m. on Wednesday, Eli was released from the animal hospital. Grand Rapids police officers and personnel with area K-9 units gathered as he was released, GRPD said in release.

Police say he has bandages and stiches, but was able to leave “under his own power.”

He is home and recovering with GRPD Officer Justin Kribs, his handler. It’s not clear if he’ll be able to return to duty. If he cannot, he will retire and will continue to live with Kribs and his family.

“On behalf of Officer Kribs, the K9 Unit, and all the men and women of the Grand Rapids Police Department, I want to thank everyone for the outpouring of support, prayers, and well wishes. We received hundreds of messages from the community, other law enforcement agencies, and K9 support organizations across the country,” Chief Eric Winstrom said in the release. “We are extremely grateful to the veterinarians and staff of the Animal Emergency Hospital for their expertise and care. With the severity of his injuries and the significant blood loss he experienced, it is truly a miracle they were able to save Eli.”

The first set of charges against Warren stem from the alleged attempted strangulation on Saturday: felonious assault, two counts of assault with a dangerous weapon, being a felon in possession of a firearm, assault with intent to do great bodily harm less than murder, and fourth-degree fleeing and eluding as a fourth-time habitual offender.

The second set of charges are linked to the standoff: assault with intent to murder, first-degree home invasion, causing serious injury to a police animal, being a felon in possession of ammunition and a firearm and three counts of felony firearm as a fourth-time habitual offender.

Online Michigan State Police records show Warren has a criminal history dating back to 2016, with convictions for drugs; retail fraud; receiving and concealing stolen property, including a car; breaking and entering a vehicle and carrying a concealed weapon. He served time in a state prison and was on parole at the time of the standoff, Michigan Department of Corrections records show.

— News 8’s Madalyn Buursma contributed to this report.