A U.S. Border Patrol agent accused of killing four people and assaulting a fifth in rural Webb County, Texas, had a trove of weapons in his home — and may have wanted to die in a confrontation with police, authorities said Monday afternoon.

Juan David Ortiz, 35, amassed "numerous" weapons in his home after a woman escaped his pickup truck and sought help from law enforcement at a gas station, Webb County Sheriff's Chief Deputy Federico Garza said at a news conference Monday afternoon.

"He had numerous, numerous weapons — he was loading up all these weapons thinking that DPS was going to confront him and he was looking at a confrontation. Thank God that didn't happen," Garza said, referring Texas' statewide law enforcement agency, the Department of Public Safety.

Juan David Ortiz Image: Juan David Ortiz / Webb County

Instead, he was spotted at a gas station by state troopers — who were aware of an alert out for him and his car — in the early hours of Sept. 15, Garza said. Ortiz had gone to use the restroom at the gas station, leaving a weapon in the car when he was confronted by the troopers, the deputy said.

Ortiz fled to a nearby hotel and hid under a pickup truck in the parking lot, Garza said.

"He was going to try to commit suicide by cop, he tried to use his phone to make it look like it was a weapon," Garza said. "It didn’t happen, he was arrested without incident."

Garza later said Ortiz had a "full house of weapons, a lot of weapons" at his home but did not have the exact count.

The district attorney's believes Ortiz posted goodbye messages on what they believe was his Facebook account in the hours after the woman fled his pickup truck.

"To my wife and kids, I love u," read one post, according to an image provided to NBC News. The other reads, "Doc Ortiz checks out. Farewell."

Facebook posts authorities believe were written by Juan David Ortiz. Webb County-Zapata County District Attorney's Office

Ortiz was a hospital corpsman in the Navy prior to joining Border Patrol, "Doc" is a common nickname for corpsman.

A public records search on Ortiz showed he testified in a federal case in 2014 that described him as having received specialized training in investigating and intercepting narcotics and human trafficking offenses. He was not a party in the case and the court found his testimony credible.

A Border Patrol official said that Ortiz had no major disciplinary actions against him and may have had "one minor allegation against him" that was being investigated but "certainly nothing to indicate this sort of behavior."

Prosecutors say Ortiz, a 10-year veteran with Border Patrol, has confessed to killing the four people in the span of about two weeks.

Ortiz is being held on four counts of murder, aggravated assault with a deadly weapon and unlawful restraint, with a bond of $2.5 million.

He is accused of fatally shooting four women, one of whom the district attorney’s office said was a transgender woman, and assaulting a fifth before she escaped.

Three of the victims were identified by authorities as Melissa Ramirez, 29; Claudine Ann Luera, 42; and Humberto Ortiz, 28. The identity of the remaining victim has not been released.

U.S. Border Patrol Chief Carla Provost said at the news conference that the allegations against Ortiz do not reflect the agency and that Ortiz has been placed on indefinite unpaid suspension.