An Oklahoma man charged with the murder of a 27-year-old woman told cops he shot and killed her “to teach her a lesson” and that “he was glad he'd done so,” authorities said.

Shane Dale Perosi, 30, was arrested Tuesday in the death of 27-year-old Martika Ferguson, the Enid Police Department said in a statement. Ferguson was found shot dead in an alleyway Sunday afternoon.

MICHIGAN MAN SAT AND WATCHED BEFORE SHOOTING WOMAN IN TARGETED ATTACK, POLICE SAY

An investigation led detectives to a residence where officers and a SWAT team served a no-knock warrant and found evidence related to the murder inside, police said.

During an interview with detectives, Perosi “confessed he shot and killed Ferguson” and said he did so “to teach her a lesson,” according to police.

Perosi was arrested Tuesday night and charged with first-degree murder, possession of a firearm after a former felony conviction, and destruction of evidence. (Enid Police Department)

When Perosi was booked at the Garfield County Detention Facility, he “again reiterated he had murdered Ferguson and said he was glad he’d done so,” the statement said.

Enid police Capt. Scott Miller praised how officers and detectives handled the investigation, working more than 280 hours over a three-day span on the case.

ARIZONA WOMAN WALKING FUNNY WAS HIDING 445 FENTANYL PILLS IN HER PANTS: DEPUTIES

“They did a very good job, were very persistent and conducted a non-stop investigation,” Miller said. “They brought closure to the victim’s family and have made our community safer with the arrest of their suspect.”

Perosi faces charges of first-degree murder, possession of a firearm after a former felony conviction, and destruction of evidence.

CLICK HERE TO GET THE FOX NEWS APP

Police did not immediately release a motive in the killing or mention whether the suspect and victim knew each other. The murder investigation is ongoing.