ROSEBURG, Ore. (AP) — A Roseburg man pleaded no contest to second-degree murder and two counts of assault with a weapon in connection with a shooting outside a motel that killed one person and wounded two others.

Devin McNamara, 34, entered the pleas in Douglas County Circuit Court last week, The News-Review reported. His plea agreement calls for 25 years to life for the murder charge and two concurrent 90-month sentences for the assault charges. Two counts of first-degree attempted murder were dismissed as part of the deal.

Police say McNamara admitted to an investigating officer that he had walked to the Budget 16 Motel “in a rage” on Feb. 23, 2021, and fired a pistol into an unknown group of people who were gathered outside one of the rooms.

Michael Benson, 36, was killed in the shooting, and Jessica Ashley, 45, and Spring Mack, 41, were both seriously injured.

McNamara reportedly fired at the three victims with a handgun, then fled to a nearby home when he ran out of bullets and returned with two rifles.

McNamara then to get into two separate vehicles at a nearby gas station but when exiting the second vehicle, no longer had the rifles, according to police. Police said he next grabbed a fuel nozzle and began dispensing fuel.

An employee at the fuel station flipped the emergency fuel shutoff switch and a Roseburg police sergeant took him to the ground and held him until other officers arrived and arrested him, police said.