PHOENIX (AP) — A judge cleared the way Thursday for thousands of young immigrants in Arizona who are protected from deportation under an Obama administration policy to get driver's licenses.

The preliminary injunction issued by U.S. District Judge David Campbell bars the state from enforcing Gov. Jan Brewer's policy of denying the licenses to about 20,000 immigrants.

The injunction that takes effect on Monday was a formality that carries out instructions issued in July by the 9th U.S. Circuit Court of Appeals.

The move in Arizona to deny the licenses was a reaction to steps taken by the Obama administration in June 2012 to shield thousands of immigrants from deportation. Brewer's move marked the nation's most visible challenge to the Obama policy.

She has asked the U.S. Supreme Court to review her appeal of the 9th Circuit decision.

Brewer lashed out at Thursday's order, saying issuing licenses is a state matter, not one for "the federal government or an unelected judiciary."

"It is outrageous that Arizona is being forced to ignore longstanding state law and comply with a flawed federal court mandate that requires the state, at least temporarily, to issue driver licenses to individuals whose presence is in violation of federal law, as established by the United States Congress," Brewer said in a statement.

The move by Obama applied to people younger than 30 who came to the U.S. before turning 16; have been in the country for at least five continuous years; are enrolled in or have graduated from a high school or equivalent program; or have served in the military.

Last month, Obama issued a broader executive order on immigration that lifts the threat of deportation from millions of immigrants living illegally in the United States.

A group of 24 states, including Arizona, joined in a federal lawsuit alleging Obama overstepped his constitutional powers.

Also in Arizona, a sheriff known for arresting hundreds of immigrants on charges of finding work using fake or stolen identities is planning to close the controversial squad that investigates such cases — ending his last major foothold in immigration enforcement after the courts and federal government have gradually reined in his powers.

Sheriff Joe Arpaio of Maricopa County, which includes Phoenix, has raided 83 businesses since 2008 leading to more than 700 immigrants in the country illegally being charged with using fake or stolen IDs to get jobs. The raids have been criticized as focusing too heavily on the workers instead of employers.