CENTRAL FALLS, R.I. – A school district that gained the support of President Obama for promoting accountability after it fired all its teachers from a struggling school announced Sunday it had reached an agreement with the union to return all the current staffers to their jobs.

The two sides said a transformation plan for Central Falls High School for the coming school year would allow the 87 teachers, guidance counselors, librarians and other staffers who were to lose their jobs at the end of this year to return without having to reapply. More than 700 people had already applied for the positions.

The agreement also imposes a longer school day, more after-school tutoring and other changes.

“What this means is that they have come to an agreement about a reform effort and that will change the quality” of the education program at Central Falls, said Rhode Island Commissioner of Education Deborah Gist.

The board of trustees overseeing the school system in Central Falls, one of the poorest communities in the state, voted in February to fire the staff of one of the state’s worst-performing schools. The school was under a mandate from the state to make improvements, and it opted for the mass firings after a breakdown in talks with teachers about other reforms that would have required more work, some without extra pay.

Obama, during a national address on education in March, said the firings were an example of the need for accountability over student performance.

“So if a school is struggling, we have to work with the principal and the teachers to find a solution,” Obama said. “We’ve got to give them a chance to make meaningful improvements. But if a school continues to fail its students year after year after year, if it doesn’t show any sign of improvement, then there’s got to be a sense of accountability.”

“And that’s what happened in Rhode Island last week at a chronically troubled school, when just 7 percent of 11th-graders passed state math tests — 7 percent.”

The union and district had been working with a mediator since March. Under the deal, teachers will need to recommit to their jobs and interview with the new principal. Other changes aimed at increasing student achievement include a new evaluation system designed to inform teaching and learning, and targeted and embedded professional development.

Central Falls Superintendent Fran Gallo said in a release the “common-sense reforms will help more of our students succeed.”

“From the start, my principal concern was not who would be working at the high school but whether the new school leadership team would have the flexibility it needed to improve student achievement,” Gallo said. “Today’s agreement provides this flexibility.”

Central Falls Teachers Union President Jane Sessums said there had always been agreement that the sides wanted what was best for the students and that significant changes were needed.

“Working together, we and the district have arrived at a solid, forward-looking agreement that provides supports for our students and the tools our teachers need to help them succeed,” Sessums said.

Senior Valerie Florez, who is due to graduate June 11, said rehiring the teachers was a good idea. “It’s not the teachers’ fault that students don’t want to learn,” she said.

Florez said she used to be one of those students who didn’t want to learn, skipping class and failing to do assignments, but her teachers helped her turn around.

Jonathan Beltran, a 19-year-old freshman at Roger Williams University who graduated from Central Falls High School last year, had helped organize rallies and protests in support of the teachers. Beltran, who hopes one day to return to Central Falls as a math teacher, said he was happy to hear about the agreement.

“I love the teachers at Central Falls,” he said. “I wouldn’t be here if it wasn’t for them. I want to work side by side with them.”

Anthony Restrepo, whose two stepdaughters attend the school, said he wants to see improvements if all the teachers are rehired but added that he wasn’t sure that the problems were entirely the staff’s fault.

“They just want to be in the streets,” he said of some students. “They want to be late, walking around ’til 12, 1 o’clock in the morning.”