PHOENIX – A federal judge on Thursday upheld an Arizona law that prohibits businesses from knowingly hiring illegal immigrants and yanks the businesses licenses of those that do.

U.S. District Judge Neil Wake’s ruling was a defeat to employers who argued the law was an unconstitutional attempt by a state to regulate immigration, traditionally the federal government’s responsibility.

Wake rejected arguments by business groups that federal immigration law severely restricts Arizona‘s ability to punish people who knowingly employ illegal immigrants.