LUBBOCK, Texas — Authorities say a tragedy was averted after a grandmother in Lubbock reported her grandson had planned a mass shooting at an area hotel.

The grandson, identified as 19-year-old William Patrick Williams, was arrested and charged with making false statements to a federally-licensed firearms dealer in the purchase of an AK-47.

Williams was arrested last Thursday by special agents with the Bureau of Alcohol, Tobacco, Firearms, and Explosives (ATF) and the Federal Bureau of Investigations (FBI) and made his initial appearance in federal court on Friday morning.

According to a recently unsealed criminal complaint, Williams told his grandmother he had recently purchased an AK-47 and planned to "shoot up" a local hotel then commit suicide by cop.

"Sensing he was both homicidal and suicidal, she convinced him to allow her to bring him to a local hospital instead," read a press release from the U.S. Attorney's Office in the Northern District of Texas.

Williams gave investigators consent to search his hotel room. There, they found an AK-47, 17 loaded magazines, multiple knives, a black trench coat, black tactical pants, black tactical gloves with the fingers cut off, and a black t-shirt that read "Let 'Em Come."

"Williams told officers he had laid out his weapons on the bed so that law enforcement could take custody of them," according to the release.

Following his arrest, ATF investigators obtained the firearms transaction form Williams completed on July 11 to purchase the AK-47. On that form, Williams listed his relatives' address, which matched his drivers license, where he no longer lived. He was living with a roommate at a different address, according to police, which was a misrepresentation of his current address on his firearms transaction form.

“This was a tragedy averted,” stated North District of Texas U.S. Attorney Nealy Cox. “I want to praise the defendant’s grandmother, who saved lives by interrupting this plot, as well as the Lubbock police officers and federal agents who investigated his unlawful acquisition of a deadly weapon."

“The FBI worked closely with our partners at the ATF and Lubbock Police Department to prevent the defendant from potentially committing a violent act,” said Matthew DeSarno, Special Agent in Charge of the Dallas Field Office. “This case is a perfect example of law enforcement agencies coming together to find a solution that protected the public from harm.”

"If you suspect a friend or loved one is planning violence against themselves or others, do not hesitate to seek help immediately by calling law enforcement," stated Cox.

If convicted, Williams faces up to five years in federal prison.

The Lubbock Police Department, the Bureau of Alcohol, Tobacco, Firearms & Explosives, and the Federal Bureau of Investigation conducted the investigation. Assistant U.S. Attorney Jeffrey Haag, NDTX’s West Texas Branch Chief, is prosecuting the case.