A Mexico man was arrested Saturday on weapons charges and first-degree trespassing with an illegally obtained handgun.

Montez L. Williams, 28, of Mexico, allegedly trespassed Saturday in the backyard of a home on Holt Street and fired a Diamondback Firearms 9mm semi-automatic handgun into the air, according to court documents.

Mexico Department of Public Safety officers were dispatched to the residence at about 12:38 p.m., where they interviewed the home’s resident. Officers learned she did not know Williams, according to court documents.

An officer searched the area and found Williams at his mother’s residence. Williams reportedly told the officer that he had slipped in some mud when the gun accidentally fired. Williams told the officer he had asked a friend to purchase the gun for him since he has previous felony convictions for second-degree domestic assault and felony resisting arrest, according to court documents.

The officer located the gun and found one unspent Luger 9mm round in the chamber of the gun and four in its magazine, according to court documents. Williams was arrested and charged with unlawful possession of a firearm, unlawful use of a weapon and first-degree trespassing.

Officers told Williams in a post-Miranda interview that they had spoken to the Holt Street resident who said Williams had shot his gun into the air. Williams said he did not intend to hurt anyone or shoot at anyone and that it was a mistake, according to court documents.