A man killed in a double fatal shooting apparently just happened to come along when another man was trying to kill his wife during a domestic dispute, police said Wednesday.

Mesa police said in a court document that 38-year-old Christopher Glen Wright told them he shot 41-year-old Nasbah Laverne Wright after shooting the other man during the encounter early Tuesday morning.

Police later identified the man who was killed as 49-year-old Tomas Olivas Ornelas.

According to the court document, Ornelas' pickup had stopped at a roundabout at a freeway interchange where Wright had crashed the couple's SUV in an attempt to kill his wife.

Detective Nikolas Rasheta, a Mesa Police Department spokesman, said it's not certain why Ornelas stopped, but he may have been a good Samaritan trying to help.

"Unfortunately, we probably will never know why he stopped," Rasheta said during an interview Wednesday.

From what Christopher Wright told police and what was found at the scene, it appears Wright's wife got out of the crashed SUV and ran up to Ornelas' pickup to get help before the shooting started, Rasheta said.

Rasheta said Ornelas was heading to work at a nearby construction site when he was killed. "Tomas was unknown" to either Wright, the police spokesman said.

Both victims' bodies were found lying on the pavement on opposite sides of the pickup. Police said in the court document they found a rifle on a seat in the SUV. Twenty expended shell casings were on the ground next to the SUV, police said.

Christopher Wright surrendered to police at the scene.

He remained jailed Wednesday on suspicion of first-degree murder and other crimes. He didn't have an attorney who could comment on the allegations when he made an initial court appearance.