(CNN) -- Kenneth James Bailey Jr. threatened violence against strangers and he delivered, shooting an innocent bystander dead and wounding two police officers before killing himself, authorities said.
The melee also resulted in the fatal shooting of a police dog by officers.
Police in Pendleton, Indiana, responded Thursday night to a report of shots fired. When they arrived, they were met with immediate and "overwhelming" gunfire from the suspect, according to a statement from police in nearby Anderson, Indiana.
The responding officer, Pendleton police Sgt. Shane Isaacs, "was ambushed by the suspect," according to a Pendleton police statement.
Isaacs was shot multiple times in the legs by the suspect before finding cover from the array of bullets, Pendleton police said.
Anderson police Officer Marty Dulworth was also injured from the suspect's gunfire, authorities said.
A total of 18 law enforcement agencies arrived at the scene. After the shootout, the suspect escaped, launching a six-hour manhunt.
The suspect's body was eventually found a block away.
Police believe Bailey, 59, shot himself sometime after authorities locked down the town of Pendleton, preventing anyone from leaving the area.
Authorities believe Bailey was in the neighborhood to confront his estranged wife, Claudia, whom he had been separated from for about 10 months, Pendleton police said.
According to Madison County court documents obtained by CNN affiliate WRTV, Claudia Bailey filed paperwork Thursday requesting a restraining order against Kenneth Bailey. In it, she cited multiple threats, including a 2010 report in which Kenneth Bailey allegedly said he wanted to "blow everyone away" at the store where she worked.
Claudia Bailey also wrote that as recently as a few weeks ago, Kenneth Bailey threatened that if he ever found her with anyone else, "he'd just shoot us from a distance where we stand."
"I'm scared he would. I'm looking over my shoulder," she wrote.
A magistrate granted the restraining order Thursday, but it is not clear if Kenneth Bailey received the paperwork before Thursday night's incident.
Shortly after the shootout, police discovered that the initial shots also struck nearby resident John Neal Shull Jr., who was sitting in his vehicle and had been blocked in traffic by the suspect's vehicle. Shull was killed.
"There is an innocent victim, he's a resident of the town, he's been a friend of mine for years, and he is deceased," Pendleton Police Chief Marc Farrer tearfully said in a press conference. "Innocent victim, totally in the wrong place at the wrong time."
The suspect was armed with a pistol and large capacity magazine, an assault rifle, a flak jacket and gas masks, Farrer said.
"He came with an ill intent," he said.
Four tactical SWAT teams were among the departments that responded to the scene. They helped move families from their homes in the early morning hours Friday as police set up a perimeter and searched for the suspect, Farrer said.
Hundreds of people gathered in a Pendleton church Friday night for a vigil in honor of Shull, the man shot dead in his car, CNN affiliate WXIN reported.
Earlier in the day, Shull's wife Noelle told WXIN she is at a loss for answers.
"Why? What was the purpose in this man shooting my husband who was only trying to come home?"
John Shull was a business owner and a volunteer in the Kiwanis club, Pendleton police added.
The shootout also led to the death of an Anderson canine officer named Kilo.
"When Officer Dulworth was shot, Kilo, in the midst of the surrounding gunfire and reacting to the loss of his handler, mistook one of the officers as an aggressor and attacked him, biting him several times," Anderson police said in a statement. "The officers found themselves faced with a confused K-9 and an armed suspect firing upon them."
Police said officers were forced to shoot Kilo during the chaos.
Kilo followed his instinct to protect his handler to the very end, police said.
Kilo had been partnered with Dulworth since 2010. He was the first Anderson police dog to die in the line of duty.