Arizona lawmakers on Tuesday decided to hold a statewide referendum on a controversial immigration law at the same time as the Nov. 5 election.

The bill, inspired by a similar one in Texas, aims to make illegal immigration a criminal offense in the state, which neighbors Mexico, and give Arizona judges the right to order immigrants deported.

In the US, border control is under the jurisdiction of the federal government, by virtue of the Constitution.

The Arizona vote came on the same day Joe Biden signed an executive order temporarily closing the U.S. border with Mexico to illegal immigrants seeking asylum.

The bill in Arizona, supported by state Republicans, adds to a series of measures that touch on the issue of immigration there, as the increase in immigration flows to the state has been extremely felt in recent years.

Arizona is among the states that will likely decide the outcome of the presidential election in November. In 2020, Joe Biden won there by just 10,000 votes.

Republicans hope that by putting the issue on the ballot, they will get their supporters to the polls in droves to also vote for their candidates, including presidential candidate Donald Trump.

Democrats, for their part, are hoping to rally voters against the measure, even as President Biden has tightened his immigration policy.

The states of Iowa and Oklahoma also adopted laws partly inspired by that of Texas.

In Texas, the impugned law was suspended by a federal appeals court, but its supporters say they will continue the fight to the Supreme Court, which is composed of a majority of conservative justices.