The governor of Alabama is taking the weekend to decide whether he will sign an Arizona-style bill into law to crack down on illegal immigrants.

If Gov. Robert Bentley gives his stamp of approval to the controversial legislation, the American Civil Liberties Union has vowed to challenge it in court.

"It's an outrageous throwback to the pre-civil rights era and we call on Governor Bentley to veto this deeply misguided bill," Cecillia Wang, director of the ACLU Immigrants' Rights Project, said Friday. "The Alabama Legislature has invited rank discrimination into people's everyday lives,"

The bill, passed by the Alabama Legislature on Thursday night, makes it a crime for a person to be in the state without a valid federal registration or other proof of legal presence.

Like the Arizona law, the bill allows police in a traffic stop to detain anyone without legal papers if the officers have "reasonable suspicion" that they may be present illegally and research by the officers can't turn up any records. "Reasonable suspicion" could include acting nervously or having a tag that doesn't match vehicle registration records, sponsors of the bill said.

It would also be a crime for an illegal immigrant to apply for work. The bill requires all Alabama businesses to use the federal E-Verify system to check the legal status of new employees, although businesses with 25 or fewer employees could get the state Department of Homeland Security to do it for them. A business caught twice for knowingly hiring an illegal immigrant would lose its business license.

The bill also makes it a crime to transport or harbor illegal immigrants and it prevents cities from passing laws to protect illegal immigrants in their cities.

The bill sailed through the Legislature on votes of 67-29 in the House and 25-7 in the Senate.

Support came from Republicans and some white Democrats, while black Democrats led the opposition.

"This is an Arizona bill with an Alabama twist," said the sponsor, House Republican leader Micky Hammon.

Republican Sen. Scott Beason, who helped write the legislation, said it's designed to take jobs away from illegal immigrants and give them to legal residents. "This is a jobs bill," he said.

Democratic Sen. Linda Coleman predicted it would lead to discrimination. But Beason said, "You can't just stop someone because of how they look."

Bentley's communications director, Rebekak Mason, said he will spend the weekend reviewing the long, complicated bill before deciding what action to take, but "having a strong illegal immigration bill has been a top priority for the governor."

The Associated Press contributed to this report.