NEWYou can now listen to Fox News articles!

A twice-deported Mexican national with a prior attempted homicide conviction was arrested in Texas over Memorial Day weekend after authorities say he fired dozens of rounds at neighbors during a standoff that ended with a SWAT team taking him into custody.

Juan Ayala Montero, 60, was arrested May 24 in Montgomery County and charged with felony deadly conduct involving the discharge of a firearm.

According to the Montgomery County Sheriff's Office, Ayala was armed with a long gun and actively firing rounds at multiple people in the Kings Colony neighborhood when deputies responded to the scene.

When a large law enforcement presence arrived, Ayala retreated into his home and barricaded himself inside, authorities said.

REPEAT OFFENDER FREED AFTER SWAT STANDOFF TIED TO THREE SHOOTINGS IN ONE MONTH: REPORT

Split image showing an older ICE photograph of Juan Ayala Montero on the left and a recent Montgomery County Sheriff's Office booking photo on the right.

Juan Ayala Montero is shown in a prior ICE image, left, and a recent Montgomery County Sheriff's Office booking photo following his arrest in Texas. Authorities say the twice-deported Mexican national was taken into custody after allegedly firing multiple rounds in a residential neighborhood. (ICE; Montgomery County Sheriff's Office)

The standoff ended after the arrival of the Montgomery County Sheriff's Office SWAT team, at which point Ayala surrendered and was taken into custody without further incident.

Investigators recovered approximately 31 shell casings from the scene and said evidence showed multiple rounds were fired toward homes and residents.

Witnesses told investigators they attempted to de-escalate the situation and convince Ayala to put down the weapon, but he continued firing, authorities said.

TEEN SUSPECT TIED TO 12 ATTACKS IN CHAOTIC AUSTIN SHOOTING SPREE IDENTIFIED AS ILLEGAL ALIEN

Close-up of flashing red and blue police lights on the roof of a patrol vehicle with emergency vehicles visible in the background.

Authorities in Montgomery County, Texas, arrested Juan Ayala Montero after he allegedly fired multiple rounds in a residential neighborhood over Memorial Day weekend. (Artur Widak/NurPhoto via Getty Images)

Initial 911 calls indicated there were multiple victims. Investigators later determined only one person, a 17-year-old male, had been struck by gunfire. The teenager was treated and released from a local hospital.

Authorities said the shooting stemmed from an altercation between Ayala and the teenager.

The juvenile was later charged with making a false report to a peace officer after investigators determined information he initially provided to law enforcement was untruthful and hindered the investigation.

WAVE OF ALLEGED MIGRANT MURDERS IGNITES FURY ACROSS US AS OFFICIALS WARN OF MORE CARNAGE, CRACKDOWN NEEDED

ICE Agents in uniform

A twice-deported Mexican national with a prior attempted homicide conviction was arrested in Texas after authorities say he fired dozens of rounds at neighbors during a Memorial Day weekend standoff that ended with a SWAT team surrender. (Fox News)

U.S. Immigration and Customs Enforcement (ICE) announced Monday that Ayala is also the subject of an immigration detainer and federal detainer after authorities determined he was in the country illegally.

Ayala, a Mexican citizen, had previously been deported from the U.S. twice and illegally reentered the country multiple times.

He was convicted of attempted homicide and criminal trespass while living in the U.S. illegally.

ICE ARRESTS ILLEGAL MIGRANT ACCUSED OF ENTERING THE COUNTRY 6 TIMES

An immigration judge ordered him removed on Aug. 31, 1999, and he was deported to Mexico on Aug. 30, 2000.

After allegedly returning illegally, he was encountered again by immigration officials following a 2006 arrest by the Dallas Police Department. He was transferred into ICE custody and removed to Mexico that same day.

Authorities allege Ayala illegally entered the U.S. for a third time on an unknown date before his most recent arrest.

EXCLUSIVE: FOX TOURS ICE DETENTION FACILITY; MANAGER HOPES TO 'DISPEL' 'FALSE NARRATIVES'

Montgomery County jail records show Ayala is being held on an $80,000 bond on the deadly conduct charge. The records also show an ICE hold and federal detainer have been lodged against him.

Authorities credited the Montgomery County Sheriff's Office's participation in ICE's 287(g) program with helping quickly identify Ayala's immigration status and secure a detainer.

CLICK HERE TO DOWNLOAD THE FOX NEWS APP

"The arrest and placement of an immigration detainer on this violent criminal illegal alien is another example of the positive impact that the 287(g) program has on increasing public safety in our local communities," ICE Enforcement and Removal Operations Houston Acting Field Office Director Gabriel Martinez said in a statement.

"By participating in the program, it provides our state and local law enforcement partners with another tool to prevent dangerous criminal illegal aliens like Ayala from being released back into the community where they will likely reoffend," Martinez added.