TOPEKA, Kan. — Republicans in two Midwestern states where GOP-controlled legislatures have gun-rights majorities are proposing measures aimed at preventing the U.S. government or other states from taking guns away from residents whom the courts deem a danger to themselves.

Neither Oklahoma nor Kansas has "red flag" laws through which relatives or police can obtain a court order to remove firearms from someone's possession. However, the proposals in those states also would prevent local city and county governments from enacting such laws. They would even go so far as to make it a felony for someone to help enforce such an order.

Sponsors said they were inspired by prospects that Congress might enact such a law or offer federal grants to entice states into putting them on the books.

Supporters of red flag laws say they reduce suicides and gun violence and lessen the risk of mass shootings. Gun-rights supporters contend they violate not only the right to own firearms but other constitutional guarantees, such as the right to due legal process, to confront an accuser, and against unreasonable searches and seizures of property.

"There's numerous violations of the Bill of Rights taking place by these red flags laws," Tulsa-area Republican state Sen. Nathan Dahm, who is sponsoring Oklahoma's measure.

Seventeen states and the District of Columbia have some sort of red flag law, with most enacting them starting in 2018, according groups favoring them and other gun-control measures. Interest in Congress appeared to grow after mass shootings in Dayton, Ohio, and El Paso, Texas.

Dahm filed his proposal in September, and it may have been the first of its kind. In Kansas, separate but identical measures were introduced in December by members of the state House and Senate. The two states' legislatures would consider them after convening their annual sessions next year.

All three measures declare that any gun-removal order from another state or a federal court are null and void, and no state or local agency could accept federal grants that require such orders to be enforced.

The U.S. Constitution prevents states from nullifying federal laws.

"States generally do not have the ability to tell the federal government, 'Get out of our state and stop enforcing your laws,'" said Kansas Attorney General Derek Schmidt, a Republican gun-rights supporters who's not taking a position on the measures. "But states do generally have the ability to tell the federal government, 'You are not able to commandeer state resources and compel us to enforce your laws.'"

Kansas state Rep. Stephanie Clayton, a Kansas City-area Democrat, called the proposals "disturbing" and said they show how extreme gun-rights backers have become in opposing any restrictions over the past decade. She said she wonders whether the proposals are a "publicity stunt" because they're going beyond trying to block red flag laws.

"It's a completely different thing to aggressively criminalize something that is intended to minimize death by suicide and murder," Clayton said. "The last time I checked, murder is bad and so is suicide."

The Washington-based, nonprofit Brady campaign against gun violence equates red flag measures with laws states have in place to combat domestic violence. Such laws allow abuse victims to get temporary court orders to keep alleged abusers away from them at least until a judge can review their cases.

Christian Heyne, Brady's vice president of policy, said people generally have to be "an acute risk" to themselves or others to have their guns removed temporarily. He said such laws targeted people "at the highest risk" of suicide or violent behavior.

"Firearms can do damage that knives cannot do," added Jonathan Lowy, Brady's chief counsel and legal affairs vice president. "Suicide is another area where the science is clear, that suicide attempts with firearms are much more successful than other means."

While the Brady campaign and other supporters of red flag laws say they have due-legal-process protections built in, Dahm and other critics argue that they're open to abuse.

Kansas state Sen. Richard Hilderbrand, a southeast Kansas Republican sponsoring one of his state's measures, said red-flag laws set the wrong target, "one tool" for someone bent on violence.

"The gun isn't what caused that mass shooting. That was the instrument that was used," Hilderbrand said. "The hate in that person's heart is what caused it, so until we start addressing that, you know, we're just going down these rabbit holes that lead to nowhere."