The Supreme Court upheld an Arizona law Thursday that penalizes businesses for hiring workers who are in the United States illegally, rejecting arguments that states have no role in immigration matters.

By a 5-3 vote, the court said that federal immigration law gives states the authority to impose sanctions on employers who hire unauthorized workers.