LOS ANGELES (AP) — Los Angeles schools Superintendent John Deasy resigned as head of the nation's second-largest school system after failing to overcome technological problems, clashing with the teachers union and losing allies on the school board.

The resignation was announced Thursday in a joint statement by Deasy and the board. A separate statement said former Superintendent Ramon C. Cortines would return to head the school system for the third time starting Oct. 20 while officials search for a successor.

Deasy, 53, led the district for 3 1/2 years and was applauded for improving student performance. Under him, the district had higher test scores, improved attendance and better graduation rates.

However, a $1 billion plan to give each student an iPad was fraught with problems and Deasy's communications with vendors investigated. In addition, the district's new computerized scheduling system left students languishing in useless classes or without courses needed to graduate.

In his resignation letter, Deasy summed up the district's achievements during his tenure and said he looked forward to being cleared of misconduct in the iPad debacle.

"Needless to say this has been hard work, in fact exhausting work," he wrote. "I have neglected my family, my health, and my parent's heath. We all carry the ball for a while, and then give it to others to continue. ... I am proud and honored, but it is time for a transition."

Deasy had a rocky relationship with the teachers' union and school board, where he lost a number of allies after the 2013 election.

Early in his tenure, he removed 130 teachers from Miramonte Elementary School when teacher Mark Berndt was charged with lewd acts on children. The teachers were placed at an unopened empty campus while an investigation ensued. The unprecedented move strained his relationship with the United Teachers of Los Angeles.

It was further stressed by his support of a lawsuit intended to undo teacher tenure protections in the state. A judge ruled the protections are unconstitutional and discriminate against minority and low-income students. The state is appealing the decision.

Deasy also sought to measure teacher performance and supported legislation to ease teacher dismissal.

United Teachers Los Angeles said Deasy's departure was "an opportunity to move in the direction of fully funded schools and collaborative management, instead of treating school improvement as a 'corporate turnaround' model, over-emphasizing testing, undermining equity and access for students, and attacking educators."

Education advocates, however, have supported Deasy for his efforts to bring reforms and accountability to public education.

U.S. Education Secretary Arne Duncan said in a statement he was disappointed that Deasy was leaving "one of the nation's toughest school systems to manage." Duncan praised Deasy's achievements, especially involving Latino and African American students.

"John's passion for his work is rooted in the belief that a great education for all students is a civil right that creates opportunities for success in life," Duncan said.

School board member Steve Zimmer said Deasy's work for youths was game-changing, including revamping school discipline to make it more holistic than punitive.

The joint decision regarding his resignation was "incredibly difficult," Zimmer said. But "you've got to be able to balance the urgency of the momentum for change with making sure everybody is moving along with you," he said.

Deasy's contract was set to expire in 2016. According to the separation agreement, he will be on special assignment through the end of the year, helping the district transition.

Thursday's joint announcement noted the district was continuing to investigate the iPad project but the board didn't believe the superintendent engaged in any ethical violations or unlawful acts.

Deasy was hired by Cortines and succeeded him in 2011. In 2012, the district paid $200,000 to settle a claim by a former district employee of sexual harassment against Cortines. In a statement at the time, Cortines acknowledged bad judgment but said no harassment occurred.

The 82-year-old Cortines said he was somewhat apprehensive to return to the top job. When a district official approached him 10 days ago, he said he wouldn't agree without all seven board members voting in approval. He said the official called his bluff when that happened earlier this week.

"I will give it my best shot," Cortines said. "The board and the superintendent have to be a team. It doesn't mean they always agree, but they have to respect each other and there has to be civility."

___

Tami Abdollah can be reached at http://www.twitter.com/latams