Texas Attorney General Ken Paxton released an opinion Thursday saying it’s legal to carry a loaded gun into church as long as there are no signs banning weapons.

The issue arose in the wake of last month’s mass shooting at First Baptist Church in Sutherland Springs, Texas, which left 26 people killed and 20 others injured. Lt. Gov. Dan Patrick had requested the legal evaluation so churches would know their options for improving security.

“If a church decides to exclude the concealed or open carrying of handguns on the premises of church property, it may provide the requisite notice, thereby making it an offense for a license holder to carry a handgun on those premises,” Mr. Paxton wrote. “However, churches may instead decide not to provide notice and to allow the carrying of handguns on their premises.”

The Texas legislature this year also passed a bill to exempt churches from having to pay fees to have their own security personnel. The bill was passed because lawmakers worried it imposed financial hardship on small churches, according to Mr. Paxton’s opinion.

Other private institutions pay fees to the state of Texas for security teams.