Montana Gov. Greg Gianforte has signed a bill into law that bans "sanctuary cities" in the state.
The new law prohibits state agencies and local governments from adopting policies that block local law enforcement from detaining undocumented immigrants sought by federal authorities. There are no sanctuary cities in Montana right now.
Supporters say the law is needed to protect public safety. Opponents say it perpetuates racism and racial profiling.
In a news release, Gianforte said "HB 200 ensures drug dealers, human traffickers, and other criminals who are in our country unlawfully will have no refuge in our state."
The contentious bill passed through the Legislature on party line votes.
Other state and local governments that have either banned or adopted sanctuary status have faced legal challenges.