With support from the National Rifle Association, the Senate's number two Republican leader, Majority Whip John Cornyn of Texas, introduced a gun bill Wednesday that would work to prevent mentally ill people from obtaining firearms.

Cornyn's bill would award states by providing federal funding to those that send additional health records about mentally ill residents to the federal background check system for firearms purchasers, the Associated Press reported.

The measure doesn't increase existing federal funding for background checks, but it would redirect existing cash to states that send in more information. Cornyn said the bill authorizes about $195 million per year for the database and other related programs.

The legislation, drafted after last month's killings in a Louisiana movie theatre by a mentally deranged gunman, would also improve programs for treating the mentally ill and create a path for people to be ordered into mental health treatment by a judge without the need for being involuntary committed, according to Politico.

However, because a person getting treatment under Cornyn's legislation wouldn't have officially been adjudicated as mentally ill, they could still purchase firearms.

Cornyn's office said that a diverse group of organizations have endorsed the bill, including the NRA, which has historically been one of the most staunch opponents to measures that would place restrictions on firearms. The NRA awarded Cornyn an "A-plus" for his efforts to protect Second Amendment rights, according to Newsweek. It is also supported by the National Alliance on Mental Illness and the National Association on Police Organizations.

The legislation is much more limited than a measure expanding background check requirements that Republican senators and the NRA defeated two years ago, and it's also narrower than a bill introduced by top Democratic Senator Chuck Schumer this week.

But it still marks a rare effort by a Republican leader to strike a middle ground on an issue that has been "politicized so much," Cornyn told reporters Wednesday.

"We've known mental health was a key component to addressing this problem in so many instances," Cornyn said, according to Politico. "And yet, rather than actually try to make progress in dealing with people who are mentally ill, we've had these broader debates about the Second Amendment and about infringing the rights of law-abiding, sane citizens."

Background checks have been mandatory since President Bill Clinton signed the Brady Bill into law in November 1993, requiring federally licensed gun dealers to conduct checks on potential gun purchasers, but mistakes do sometimes happen.

"We know because the background check system depends on the voluntary participation and compliance of various states, that there's a lot of variety in the ways that the states upload their background check information," Cornyn said. "So what this will do is to make sure that it'll clarify the scope of the mental health records that the states must share and upload on the background check system."