By Tim Gaynor

PHOENIX (Reuters) - Arizona has agreed to offer targeted reading and writing instruction to tens of thousands of public school students who were wrongly denied services under an English Language Learner program, the Justice Department said on Friday.

The settlement resolves a complaint filed with the Department of Education's Office of Civil Rights and the Department of Justice that students had been incorrectly identified as fluent in English over the past five school years or prematurely moved out of the language assistance program.

"All students are entitled to equal opportunities, and this resolution will help to make sure Arizona students receive the education they deserve," Russlynn Ali, Assistant Secretary for the Office for Civil Rights at the Department of Education, said in a statement announcing a settlement in the case.

The agreement comes as Arizona is at loggerheads with the administration of President Barack Obama over the Mexican border state's treatment of illegal immigrants within state borders, estimated to number around 360,000.

Nearly a third of the state's population of 6.5 million are Hispanic, and a language other than English is spoken in just over a quarter - 27 percent - of homes, according to U.S. Census Bureau figures for 2010.

The education department said nearly 1.1 million students were currently in school in the state, of whom 70,027 were enrolled in the English Language Learner program this year.

Arizona Superintendent of Public Instruction John Huppenthal called the Justice Department's description of the settlement as an enforcement action unfortunate, disputing assertions that the state had incorrectly identified the English capabilities of the students.

"In an effort to resolve this matter expediently, the department agreed to participate in this voluntary process in order to get back to the business of delivering all of Arizona's students the best education possible," Huppenthal said in a statement.

In addition to being required to offer more services to the students, the settlement requires Arizona to develop proficiency criteria to accurately identify students who need English language help and to graduate them from the ELL program.

Arizona was thrust into the spotlight in June when the U.S. Supreme Court upheld a controversial "show-your-papers" provision that requires police to check the status of people they stop and suspect are in the country illegally.

The provision is part of a crackdown on illegal immigration signed in 2010 by Republican Governor Jan Brewer that backers said was needed because of the failure of the federal government to secure the porous border with Mexico. Opponents have slammed the law as a mandate for racial profiling.

Earlier this month Brewer again clashed with the White House over an order barring illegal immigrants who qualify for temporary legal status in the United States from receiving any state or local public benefits.

The action was a response to relaxed deportation rules issued by the Obama administration that came into effect on August 15 and was not connected to the settlement announced Friday, an education department spokeswoman said.

(Editing by Cynthia Johnston and Todd Eastham)