AUGUSTA, Maine — Gov. Paul LePage on Friday signed into law a bill that shields personal information about concealed firearms permit holders from the public.

LePage, who announced the signing through his Twitter account, endorsed the bill a day after it gained final approval in both the House and Senate. The bill takes effect immediately because more than two-thirds of legislators in each chamber approved.

The bill, LD 345, arose in the wake of the Sandy Hook Elementary School shootings in Newtown, Conn., and it was expedited by the Legislature after the Bangor Daily News requested access to handgun permit data in Maine under the state’s open records law. It was sponsored by freshman Rep. Corey Wilson, R-Augusta.

While the newspaper, which rescinded its request, maintained it would not publish the personal information, gun and privacy rights advocates said they worried the release of the information could put some in danger.

Lawmakers passed emergency legislation in February that temporarily shielded the information from the public. That temporary law was set to expire on Tuesday.

“It was a long and sometimes contentious road, but ultimately, I think we crafted a very reasonable and effective bill that will provide concealed handgun permit holders with the privacy and safety that they deserve,” Wilson said Friday in a prepared statement.

In addition to shielding permit holders’ personal information from public view, the version of the bill that passed would charge the Maine State Police with gathering statistical and sortable aggregate data on permit holders, including age, sex, ZIP code or municipality, and issuing a report with the information. That report is due early next year.

The report would also recommend a way to create a statewide database of permit holders available to law enforcement and create a uniform permit design. Currently, Maine State Police issue just more than half of the the estimated 30,000 permits in Maine, including about 8,000 for nonresidents. Local police chiefs, town and city councils, and boards of selectmen issue the remaining permits.

Scott Thistle of the Sun Journal contributed to this report.