The suspect in a Thursday night standoff outside the emergency room at Landmark Medical Center in Woonsocket brought a gun into the ER there 20 years ago.
Jose Giles of Burrillville was in court Friday.
Police say he was distraught over a family issue when he parked his truck outside the hospital, holding a rifle to his head.
After a couple hours, the SWAT team moved in when the suspect got out of the truck to relieve himself.
But as officers approached, they say he reached for the rifle to again put it to his head.
Woonsocket Police Lt. Brad Scully ultimately knocked the rifle out of the man's hands as he was firing it.
Scully told NBC10, "Maybe I'm only 4 or 5 feet from him. I could see him grimace and close his eyes, like he's probably going to pull the trigger. I immediately just dove at him and reached over with my hand and was able to knock the gun from the direction off his temple to the top of his head. And that's when the round went just above his airline, just went over his head."
In September of 1993, Giles brought a gun into the emergency room at Landmark, essentially holding two nurses hostage for about a half hour.
"It was kind of disbelief and not believing that it could be him again," Bill Wilkins told NBC10 Friday. He was one of the nurses involved in the 1993 incident. "He pulled a gun out of his pocket and pointed it at me and pointed it at himselfAnd after a brief period where he kept pointing the gun at us and at himself I just, not thinking, grabbed the gun and pulled it away from him and tossed it out in the hallway to the police officers that were waiting out in the hall."
Wilkins said Giles was upset over a marital problem.
Giles was sentenced to five years probation and ordered to surrender his weapons as a result of that case.
He is now being held for mental observation after his court appearance Friday.