Georgia lawmakers reached a compromise Thursday to pass a controversial immigration bill. As the bill awaits the governor’s signature, critics are promising a fight.

Some parts of the bill are similar to an Arizona law being challenged in court. State senators and house members were initially split, but settled on checks to crack down on employers hiring illegal immigrants. Supporters said it’s the best thing for the state, and critics said it’s unconstitutional.

“We think we have done the job that we were sent here to do,” Rep. Matt Ramsey, R-Peachtree City, said.

Ramsey, the bill’s sponsor, shook hands with fellow lawmakers after his legislation passed late Thursday night.

“We’ve addressed the issues of access to taxpayer-funded public benefits. We’ve addressed the issue of access to jobs by those who are ineligible,” Ramsey said.

The immigration bill would make businesses with 10 or more employees use the federal E-verify system to make sure new hires are in the country legally. It would also give police the authority to check the immigration status of certain suspects and detain them if here illegally.

Opponents of the bill protested late into the night. Critics, like Adelina Nichols, said it will negatively affect jobs and commerce in Georgia.

“We will see how that is going to diminish the labor force in terms of the economy,” Nichols said.

She said opposition groups are planning a legal challenge to the bill she sees as unconstitutional. But first, they are taking their fight to the governor’s office.

“We are going to sign petitions asking governor Deal to veto,” Nichols said.

Ramsey said opponents’ argument has no legs.

“We’re confident in the constitutionality of the bill, the legality of the bill,” Ramsey said.

Gov. Nathan Deal has not said what he plans on doing with the bill.