WASHINGTON — The Supreme Court on Thursday upheld an Arizona law that imposes harsh penalties on businesses that hire illegal immigrants.

The 5-to-3 decision amounted to a green light for vigorous state efforts to combat the employment of illegal workers. The majority opinion, written by Chief Justice John G. Roberts on behalf of the court’s five more conservative members, noted that Colorado, Mississippi, Missouri, Pennsylvania, Tennessee, Virginia and West Virginia have recently enacted laws similar to the one at issue in the case.

The decision did not directly address a second, more recent Arizona law that in some circumstances requires police there to question people they stop about their immigration status. The United States Court of Appeals for the Ninth Circuit blocked enforcement of that law in April, and the case may reach the Supreme Court soon.

The challenge to the older Arizona law that was the subject of Thursday’s decision was brought by a coalition of business and civil liberties groups, with support from the Obama administration. They said the law, the Legal Arizona Workers Act, conflicted with federal immigration policy.