"We are a nation of laws, and immigration laws will be enforced in Montana," Gianforte said in a statement, according to The Associated Press.
The AP reports that the state does not currently have any sanctuary cities.
A number of cities across America in recent years have declared themselves "sanctuaries" for undocumented immigrants hoping to avoid arrest and deportation by the federal government.
The Montana law will require cities to cooperate with federal agencies like Immigration and Customs Enforcement and Customs and Border Protection, and gives the state's attorney general, also a Republican, the power to pursue civil action against jurisdictions that refuse.
The state could now legally withhold grants and other funding to cities and towns that do not comply with the state government's new mandate, the newspaper reported.
Fewer than 5,000 undocumented immigrants comprised 12 percent of Montana's immigrant population as of 2016 and less than half a percent of the total state population, according to the independent American Immigration Council.
Republicans in Montana have been pushing for the measure after former Gov. Steve BullockSteve BullockDark money group spent 0M on voter turnout in 2020 In Montana, a knock-down redistricting fight over a single line 65 former governors, mayors back bipartisan infrastructure deal MORE (D) vetoed a similar bill in 2019.