Chicago teachers and the country’s third-largest school district reached a labor contract deal on Thursday, ending a strike that canceled 11 days of classes for more than 300,000 children. Students will be back at school on Friday morning.

The city’s mayor, Lori Lightfoot, announced that the district had reached a deal with the Chicago Teachers Union after months of unsuccessful negotiations led to the city’s first significant walkout by educators since 2012.

The union’s 25,000 members went on strike on 17 October, holding marches and rallies across the city.

Chicago Teachers Union delegates voted late on Wednesday to approve a tentative deal that includes pay raises over five years, but they initially refused to end the strike unless the mayor added school days to cover the lost time.

The union said Lightfoot had agreed to make up five days of lost time.

Throughout the strike, the district kept schools open, promising parents that their kids would have a safe place to go and receive meals. City parks, libraries and community groups also opened their doors to children whose working parents didn’t want to leave them home alone but were uncomfortable using schools being picketed by educators.

Families across the city breathed a sigh of relief as they heard the news.

“It is over finally, thank God,” said Dominique Dukes, who has two children, seven and 14. “They did miss out on their education. It was the worst experience. Hopefully it doesn’t happen again.”

Dukes, 33, said she printed grade-school worksheets at the library to keep her children occupied. Dukes works early mornings at a warehouse and her boyfriend works nights; they took turns watching the children.

Teachers said the strike was based on a social justice agenda and aimed to increase resources, including nurses and social workers for students, and reduce class sizes, which teachers say exceed 30 or 40 students in some schools. Union leaders said the strike forced the city to negotiate on issues such as support for homeless students.

Lightfoot said a strike was unnecessary and dubbed the city’s offer of a 16% raise for teachers over a five-year contract and other commitments “historic”.

The Chicago strike was another test of efforts by teachers’ unions to use contract talks typically focused on salaries and benefits and force sweeping conversations about broader problems such as affordable housing, protections for immigrants and class sizes.

