(CNN) — A US Border Patrol agent who authorities are calling a serial killer was arrested Saturday in the deaths of four people after a would-be fifth victim narrowly escaped harm and alerted a police officer.

Juan David Ortiz, 35, confessed to killing four people between September 3 and September 15, according to a criminal complaint filed in Webb County, Texas. Ortiz was charged with four murder charges and one unlawful restraint with aggravated assault with a deadly weapon, according to Webb County District Attorney Isidro R. “Chilo” Alaniz.

The bodies of four victims were found over the past two weeks, sheriff’s spokesman Eduardo Chapa told CNN. Chapa said investigators are not ruling out the possibility of more victims. An affidavit originally described the victims as three women and one man but the sheriff’s office later said that the victim identified as male was a transgender woman.

The victims were shot in the head, according to the affidavit. All of the victims worked as prostitutes, authorities told CNN.

“He was profiling certain kinds of victims,” Alaniz said, adding “the suspect was hunting for his victims.” The prosecutor says he feels comfortable describing Ortiz as a serial killer.

It was not immediately known whether Ortiz has an attorney.

Andrew Meehan, a US Customs and Border Protection spokesperson, said in a statement to CNN that the agency is fully cooperating with investigators.

“While it is CBP policy to not comment on the details of an ongoing investigation, criminal action by our employees is not, and will not be tolerated,” his statement read. “Out of respect for the victims’ family and friends, we ask that deference and due process be given to the investigation so that all the facts are brought to light and they can receive the closure they deserve.”

Woman able to escape, call police

The case broke Friday after a woman narrowly escaped Ortiz’s grasp, the criminal affidavit shows.

The woman was in a truck with a man named “David” and the two started talking about one of the prostitutes who had gone missing a week earlier. The man then pulled out a pistol and pointed it at her, and when she tried to flee, he grabbed her shirt to prevent her from leaving the vehicle, the affidavit states.

She pulled off her shirt and ran to a nearby gas station, where she found a state trooper. The victim was able to provide a detailed description of Ortiz, including his tattoos, Alaniz said.

Authorities found Ortiz at a gas station in Laredo, about 160 miles southwest of San Antonio. He fled the scene on foot and ran to a Ramada Inn, where he was found hiding in the bed of a pickup truck, Alaniz said.

Ortiz was read his Miranda Rights and then verbally confessed to killing four people over the last two weeks, the affidavit states. Two of the four killings took place in the hours after the woman was able to escape but before police tracked him down, according to the affidavit.

“We have very strong evidence that he is the person who has been killing,” Webb County Sheriff Martin Cuellar said at a news conference posted on CNN affiliate KGNS’s Facebook page.

Ortiz, Cuellar said, spent 10 years as an agent with the US Border Patrol. He also is a US Navy veteran, Alaniz said.

Cuellar passed his condolences to the families of the four victims. He said his department, along with other state and federal agencies, had been “working diligently on this case.”

The-CNN-Wire™ & © 2018 Cable News Network, Inc., a Time Warner Company. All rights reserved.