Texas grandma heroically foils grandson's mass shooting plot by bringing him to hospital Williams, 19, was taken into custody by federal agents in Lubbock, Texas.

A Texas grandmother was hailed as a hero by federal authorities after she foiled a potential mass shooting by taking her grandson to a hospital after he allegedly made threats.

William Patrick Williams, 19, was taken into custody by federal agents in Lubbock, Texas, after he told his grandmother about a plot to "shoot up" a local hotel and then commit suicide by cop, according to the Department of Justice.

According to a criminal complaint, the plot came to light on July 13, just weeks before a pair of mass shootings claimed the lives of at least 31 people in one weekend, when Williams told his grandmother that he'd purchased an AK-47.

Sensing he could be both homicidal and suicidal, federal officials said the grandmother convinced Williams to go with her to a local hospital instead of carrying out the shooting, averting a potential tragedy.

"This was a tragedy averted," U.S. Attorney Nealy Cox said in a statement. "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."

"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," she added.

Police said Williams gave officers permission to search a room a he’d rented at a Texas hotel, where they discovered an AK-47 rifle, 17 loaded magazines and multiple knives, according to the statement.

Officers also found a black trench coat, black tactical pants, black tactical gloves with the fingers cut off and a black t-shirt with the words "Let ‘Em Come" written on it.

After looking into the suspect's background, authorities later discovered that he listed false information and misrepresented his address when he purchased the firearm from a federally-licensed dealer last month, according to the DOJ.

Williams was arrested last Thursday, after a brief hospital stay by the Bureau of Alcohol, Tobacco, Firearms and Explosives and the FBI for allegedly making false statements to a firearms dealer. If convicted as charged, authorities said he could face up to five years in federal prison.