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.

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.

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.

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.

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.

"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.