An Arizona man was arrested for allegedly shooting five people, killing four and injuring a fifth, during a string of shootings between Friday and Saturday.

The Mesa Police Department arrested Iren Byers, 20, after he allegedly confessed to all five shootings while in custody for trespassing, FOX 10 in Phoenix reported.

When Byers told police he committed the crimes, he told detectives where the handgun was located and where the clothes were that he wore when he shot the individuals.

Iren Byers mugshot

Iren Byers allegedly confessed to shooting five people, leaving four dead and another injured in Arizona. (Mesa Police)

After retrieving the handgun, detectives were able to link the firearm to another murder that happened on Friday in Phoenix, near 24th and Oak streets.

ARIZONA MAN HEROICALLY SAVES TWO TODDLERS FROM BURNING CAR MOMENTS BEFORE IT'S ENGULFED IN FLAMES

The victim, 41-year-old Nicholas Arnstad, was found dead next to a canal in the area.

Police said Byers admitted to killing Arnstad, adding that security footage from each of the crime scenes linked the suspect to the shootings.

The news outlet reported that the Mesa Police provided a timeline of the shootings.

ARIZONA TROOPER SHOT, HOSPITALIZED IN NORTH PHOENIX; INVESTIGATION UNDERWAY

Police car with lights on

Police car with blue lights on the crime scene in traffic urban environment. Police said a 20-year-old man went on a shooting spree in Arizona. (iStock)

At about 10:30 p.m. on May 26, police found a 41-year-old man dead near Main Street and Alma School Road.

As police investigated the body, they heard gunshots, and at about 12:15 a.m., officers found a 36-year-old woman who was shot on Main Street. She was taken to a nearby hospital and treated for her injuries.

About 45 minutes later, another 41-year-old man’s body was located at a bus station near Broadway Road and Country Club Drive.

Then, at 2 a.m., police found another body of an adult man near 2nd Avenue.

CLICK HERE TO GET THE FOX NEWS APP

Police are still searching for a motive, saying all the shootings took place outside, and the victims are believed to have been homeless.

Byers was charged with four counts of first-degree murder and one count of first-degree attempted murder.