ST. LOUIS (AP) — The Missouri Supreme Court is set to hear arguments Monday on the constitutionality of a new state law forbidding local law enforcement from enforcing federal gun laws.

A lower court judge rejected a challenge to the law brought by St. Louis city and county and Kansas City officials last August, so they appealed to the higher court.

The gun law has drawn strong opposition from police departments across the state, and federal law enforcement officials have said it hampers criminal investigations and hurts cooperation between federal and local investigators.

The cities say in their appeal that the law could also prevent state and local officers from participating in important task forces with federal officials.

State officials who are defending the law argue it is necessary to prevent federal officials from trying to enforce new gun control measures.

Gun rights groups, such as the Missouri Firearms Coalition, have also weighed in, arguing that the law is needed because “gun rights are in a precarious situation in America.”

A separate lawsuit asking a judge to clarify the provisions of the law is also progressing in lower courts. That lawsuit filed by the city of Arnold attracted support last month from a group of nearly 60 Missouri police chiefs associated with the St. Louis Area Police Chiefs Association or the Missouri Police Chiefs Association.