ALBANY - Prospective handgun owners in New York could be required to turn over the passwords to their major social-media accounts for a search if a newly introduced bill becomes law.

The bill from Sen. Kevin Parker, D-Brooklyn, would require all gun-permit applicants to allow their social-media accounts and search-engine history to be scrutinized for hateful slurs and terroristic threats prior to receiving a handgun permit or having one renewed in New York.

If approved, the bill would allow an investigating officer — in most cases, a local police authority — to obtain "any log-in name, password or other means" necessary to review the applicant's social media accounts and search history.

Parker introduced the bill in response to the Oct. 27 shooting at the Tree of Life Congregation Synagogue in Pittsburgh, which left 11 people dead.

The suspected shooter had published numerous anti-Semitic posts on social media ahead of his deadly rampage.

"Although New York State has some of the strictest gun laws in the country, we can no longer provide protection to gun owners at the expense of the rest of society," Parker wrote in a memo attached to the bill.

Three years of review

The bill would apply to those seeking or renewing a handgun permit as well as those renewing a registration for an assault-style rifle that was owned prior to the SAFE Act's passage in 2013, according to Parker.

If signed into law, up to three years of social-media posts and one year of search history would be open to scrutiny.

Only four social-media sites or apps (Facebook, Instagram, Twitter and Snapchat) and three search engines (Google, Yahoo and Bing) would be subject to search.

In an interview, Parker said he believes the bill is necessary given a string of high-profile incidents where suspected shooters or bombers have posted disturbing things on social media that weren't discovered until after the fact.

He pointed to the Pittsburgh shooter and the Florida man who mailed bombs to Democratic politicians and CNN.

Parker said he believes the legislation fully complies with the Constitution. It would be up to State Police to determine how best to do the social-media searches and whether giving up a password would be necessary, he said.

"We're in a new age with new technology, and we need new rules," Parker said. "So we need to begin a conversation about the way that we monitor social media and use that in the context of giving out dangerous weapons that can in fact hurt or kill people."

Will it pass?

It's unclear whether the bill will get much consideration in Albany, where Democrats will gain control of the Senate in January after Republicans controlled the chamber for much of the past century.

Parker's bill did not have an Assembly sponsor as of Monday.

Tom King, president of the state Rifle and Pistol Association, said he believes the bill would violate First Amendment rights to free speech.

"This is the slippery search toward regulating all of our rights," King said. "Isn't posting on social media protected speech? This would put a chill on your voice and add a chill to your First Amendment rights."

Parker said he doesn't believe his bill goes too far.

"Ask the families of the people who were murdered in Pittsburgh if they thought it would be too far to make sure that that murderer didn't get his hands on a dangerous weapon," he said.

JCAMPBELL1@Gannett.com

Jon Campbell is a correspondent for the USA TODAY Network's Albany Bureau.