Ross D. Franklin, Associated Press
A line stretches outside an a Arizona Department of Transportation Motor Vehicle Division office, as many young immigrants protected from deportation under new Obama administration policies begin pursuing Arizona driver's licenses, Monday, Dec. 22, 2014, in Phoenix. Monday marked the first day that about 20,000 immigrants in the country illegally who have received protection from deportation could apply for Arizona licenses.

PHOENIX — Young immigrants protected from deportation under an Obama administration policy started applying Monday for Arizona driver's licenses after a judge barred the state from denying the privilege.

Dozens of young immigrants lined up outside government offices before the opening of business.

Jose Alberto Aguilar, a Mexico City native who was brought to the U.S. by his parents as a child, waited in a line at a Motor Vehicle Division office in Tucson. The 23-year-old civil engineer rides the bus to work each day.

"It's great because it allows me to get a car and be safer too," Aguilar said.

Aguilar says he was hired as a civil engineer after an internship made possible when he acquired a Social Security number through the Obama administration program that he said "really opened a lot of doors for me."

People lined up at a Motor Vehicle Division office in Phoenix cheered when the doors opened for business.

They said they were excited to finally get a chance to drive legally. Some said they had been driving to their jobs for years without licenses and feared being pulled over.

Young immigrants have said the governor's policy made it difficult or impossible for them to get essential things done in their everyday lives, such as going to school, work or the store.

State officials expect the rush of applicants to continue in the weeks ahead since about 20,000 immigrants could be eligible for licenses.

Arizona moved to deny the driver's licenses after the Obama administration took steps in 2012 to shield thousands of immigrants from deportation.

The president's policy 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.

In the nation's most visible challenge to Obama's deferred-action program, Brewer issued an executive order in August 2012 directing state agencies to deny driver's licenses and other public benefits to immigrants who get work authorization under the Obama policy.

Her attorneys have argued that the decision grew out of liability concerns and the desire to reduce the risk of the licenses being used to improperly access public benefits.

Despite her belief that issuing licenses is a state matter, Brewer's office confirmed she would comply with the court's orders. However, she is asking the U.S. Supreme Court to review her appeal.

Nebraska is the only other state to have made similar denials, and a federal judge this year dismissed a lawsuit contesting that state's policy.

Associated Press writer Astrid Galván in Tucson contributed to this report.