GALVESTON, Texas (CBSDFW.COM/AP) — The Galveston City Council voted to repeal an ordinance that prevented gun shops and shooting ranges from being located near schools or places of worship.

The City Council unanimously approved the amended land-use regulations Thursday to comply with state law and avoid a potential lawsuit.

READ MORE: Dallas Stars Win Fourth Game In A Row, Beating Arizona Coyotes 3-2

The Texas Attorney General’s Office sent a letter to the city warning it couldn’t make laws regulating ownership, transfer, transportation or storage of firearms.

“The Office of the Attorney General demands that the City repeal these regulations and any like them immediately,” Assistant Attorney General Cleve Doty wrote in the letter. “Rather than file litigation now, we are confident that the City of Galveston intends to comply with Texas law and will rescind regulations that are in violation of Texas law.”

READ MORE: Dallas Police Ask Public For Help Finding Deadly Hit-And-Run Suspects

Prior to the vote, council members acknowledged that their hands were tied by state law.

Gun shops will now be treated the same as any other commercial retail entity.

Shooting ranges will also no longer be required to limit noise to a certain decibel level.

MORE NEWS: Missing Canadian Aaron Tschritter Last Seen In Deep Ellum Came For Cowboys Game, Never Made It 

(© Copyright 2020 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)