Denver’s teachers may soon be returning to school.

More than 2,000 educators, who have been on strike since Monday, said they reached a tentative deal Thursday with the local school district.

Details are not yet available, but the deal includes an average 11.7 percent pay raise and annual cost of living increases, according to the school district and the Denver Classroom Teachers Association, a labor union representing more than 5,000 educators in Denver public schools. It will also include raises for school support staff. Bus drivers and cafeteria workers may also get a raise, but that’s not part of the official agreement with the teachers union.

It also addresses the teachers’ biggest concern: the need to overhaul the merit-pay system, which relies heavily on annual bonuses that fluctuate from year to year. The new system will place more emphasis on education and training when considering promotions, while keeping some bonuses in place.

Where will they find the $23 million to pay for this? The district agreed to cut back on administrative costs, and will eliminate about 150 positions in the school’s central office. Five-figure bonuses for senior school administrators will also come to an end.

The pact was reached after an all-night negotiation marathon between the union and school administrators. Henry Roman, president of the union, described it as a “historic” deal. “No longer will our students see their education disrupted because their teachers cannot afford to stay in their classrooms,” Roman said in a statement Monday morning.

Teachers did make some concessions, but the deal represents a remarkable win for Denver’s teachers, who have been picketing and rallying in the streets for the past two days, while school administrators struggled to keep classes on schedule. It’s also a sign of the overwhelming momentum teachers have on their side from months of widespread teacher strikes across the country over school funding cuts and low teacher pay.

Arbitrary bonuses and low pay

Teachers were most upset about Denver’s incentive pay system, which started more than a decade ago. The district pays bonuses based on teacher performance, and to encourage teachers to work in high-poverty schools.

But the union says the bonuses vary too much from year to year, creating financial instability for educators and their families. They also say it’s unclear how the district measures good performance and determines bonuses.

Instead, teachers wanted the district to lower bonuses and increase their base salaries, and to give them salaries based on education and training, like most school districts do.

Colorado teachers are among the lowest-paid in the country, earning an average of $46,155 in 2016 — ranking Colorado 46th in average teacher pay, according to the National Education Association. The state also spends about $2,500 less per student each year than the national average. The new deal would boost starting pay for teachers by 7 percent, but the average pay raise for all educators, nurses, and counselors will be 11.7 percent.

The Denver Classroom Teachers Association voted to authorize a strike in January with support from 93 percent of its members. At the time, the two sides were about $8 million apart in reaching an agreement.

After authorizing a strike, the school district fought back. Officials asked Democratic Gov. Jared Polis to intervene, a legal move that delayed the strike as the state government weighed its options. But last week, the governor declined to take part in the dispute, which could have further delayed a strike by up to 180 days.

That wasn’t the first attempt to keep teachers from going on strike, though. Far from it.

Republican lawmakers tried to make striking illegal

In April, two Republican state legislators tried to shut down a potential teachers strike in Colorado with the threat of jail time.

The bill, introduced in the state Senate, prohibited districts from supporting a teachers strike and required schools to dock a teacher’s pay for each day they participate in a walkout. The teachers could also have faced up to six months in jail and a $500 daily fine if they violated a court order to stop striking.

The bill was a reaction to the teacher strikes sweeping red and purple states, including Oklahoma, West Virginia, Arizona, and Kentucky. Thousands of teachers in Colorado had joined the grassroots movement, holding rallies at the state capitol to demand a pay raise and more funding.

The bill failed. The strike happened — and it worked. Now, it looks like Denver teachers are going back to class.