An Indiana man shot and killed himself shortly after gunning down a doctor who refused to prescribe opioid medication to his wife, authorities said this week.

The alleged murder and the suicide unfolded within just hours of each other Wednesday in Mishawaka in northern Indiana, a state that's been gripped by problems with opioid addiction over the past several years. St. Joseph County Prosecutor Ken Cotter told reporters that Michael Jarvis confronted physician Todd Graham for not prescribing an opioid for his wife's chronic pain, but he cautioned that investigators are still determining whether drug addiction played a role in the killing.

Cotter said during a news conference Thursday that Jarvis and his wife showed up at Graham's office for an appointment Wednesday morning. Jarvis became upset after Graham told them that he doesn't believe chronic pain requires opioid medication. The couple left, but Jarvis - armed with a gun - drove back to the doctor's office about two hours later, Cotter said.

At that point, Graham was on his way to the St. Joseph Rehabilitation Institute a few miles from his office. Jarvis followed him to the institute's parking lot where the two argued, Cotter said.

"There were two witnesses who were outside and in close proximity," Cotter told reporters. "Jarvis went to those two witnesses and told them to leave. They saw a gun."

Jarvis shot Graham, then drove to a friend's home, where he "gave indication that he was no longer going to be around," Cotter said. The friend, concerned for Jarvis's safety, called 911, but Jarvis killed himself before police arrived.

Cotter said Jarvis' wife did not know that he had driven back to the doctor's office and killed Graham. It also remains unclear whether both the husband and wife were addicted to opioid medications or whether Jarvis wanted the drugs for himself.

"There's some indication that Jarvis may have also had his own issues. We're still investigating that," Cotter said. "We're talking about a man who made a choice to kill another person. We're not talking about the opioid problem. . . . Was that a contributing factor in his decision? We don't know that yet."

Cotter said Jarvis was not a patient of Graham's and that investigators are looking at medical records to determine what drugs, if any, he and his wife had been prescribed previously. He did not say what type of opioid medication Jarvis and his wife were seeking when they went to Graham's office.

The South Bend Tribune reported that both Jarvis and Graham were employed in some capacity by the University of Notre Dame in South Bend, just west of Mishawaka.

Jarvis, 48, was a part-time parking attendant and groundskeeper, a university spokesman said in statement, according to the newspaper.

Graham was a consulting physician at the university.

"His brutal death is shocking to us all, we extend our condolences to his family and friends. Our prayers are with them," the statement said of Graham.

Graham, 56, was also a physical medicine and rehabilitation specialist at South Bend Orthopaedics, where patients gave him a 4.3 out of 5 rating.

Patients who wrote reviews on the clinic's website described Graham as a trustworthy doctor who took the time to answer their questions and explain their problems. One said he's the best doctor the clinic has. Another called him a "miracle worker."

"Dr Graham is more than my dr to me. He has treated me like a friend and I owe him my life. I can never thank him enough for his kindness and caring through my journey of a tough diagnosis of cancer. He is a great and caring dr," one patient wrote in July 2016.

Another patient wrote the same month: "Dr. Graham was awesome. He looked at my MRI results and immediately had a plan in place. I really appreciated the time and concern he put into getting me some relief for the pain that I've been in. Hopefully this works!"

Graham studied at Northwestern University School of Medicine in Chicago and did his residency at the university's rehabilitation institute.

"He dedicated his life to taking care of people and that's the sad, sad part of this whole thing ... His personality was electric. He lit up a room anytime he walked into the room," physician A.J. Mencias, Graham's friend and business partner, told NBC affiliate WNDU.

Mencias said Graham had three children.

Cotter, the prosecutor, echoed those tributes at the news conference.

"He did what we ask our doctors to do: Don't overprescribe opioid and, unfortunately, for whatever reason, Jarvis made that choice to take his life," he told reporters, adding later: "Every homicide is tragic, but this one in particular, I think, hits home to everyone. It hits home to all of our medical professionals. Their job is to try to help people, and that certainly what Dr. Graham was doing."