Texas Sen. John Cornyn. AP US Sen. John Cornyn (R-Texas) — the No. 2-ranking Senate Republican — has proposed a bill that would incentivize states to send more information about residents with serious mental-health problems to the federal background check system for firearm purchasers (NICS).

The bill, called the Mental Health and Safe Communities Act, is designed to "enhance the ability of local communities to identify and treat potentially dangerous, mentally-ill individuals," Cornyn said in a statement announcing its introduction.

It's a rare step by a Republican to impose curbs on gun purchases, and it would be aimed at preventing mass shootings like one at a Louisiana movie theater last month and another at a church in South Carolina in June.

Specifically, states that give 90% of their records on people with serious mental issues to NICS will be eligible for a 5% increase in law-enforcement grants. Those grants can then be used to screen for mental problems in prisoners and improve training for law-enforcement officers and others on handling emergencies involving the mentally ill, The Associated Press reports. On the flip side, states that provide less than 90% of that information could see their criminal-justice grants decrease.

Currently, people deemed to be "mentally defective" are barred from NICS from purchasing a firearm, but states are not required to send those records to the FBI-run database, the AP reports.

The bill is backed by the National Rifle Association. Cornyn has an A-plus rating from the the organization, which has stifled multiple gun bills introduced in the wake of the 2012 massacre at Sandy Hook Elementary School in Newtown, Conn. Most famously, the Senate in 2013 failed to pass a measure that would have expanded background checks.

But NRA spokeswoman Jennifer Baker told the AP that Cornyn's legislation would take "meaningful steps toward fixing the system and making our communities safer."

"While potentially dangerous mentally-ill individuals are often known to law enforcement and local officials, gaps in existing law or inadequate resources prevent our communities from taking proactive steps to prevent them from becoming violent,” Cornyn said in his statement.

"This legislation will strengthen programs that promote preventative screening and crisis response training so that we can better understand and treat the factors which may endanger public safety," Cornyn continued. "By giving our communities the resources necessary to recognize and prevent acts of violence, we not only protect American families, but help those affected by mental illness."