South Africa’s National Union of Mineworkers (NUM) has agreed a three-year wage agreement with coal producers, averting a sector-wide strike that could have impacted power supply, the company said on Thursday.

The union reached the agreement, which varies for each coal producer, after saying last month it would call a strike if wage demands were not met by the Chamber of Mines, the body which has been representing several mining firms in pay talks.

A strike in the coal sector could affect the nation’s power supply, as most of the country’s power is generated from the fuel.

The Chamber of Mines represents companies in the negotiations including Anglo American Coal, Exxaro and Glencore.

For the lowest-paid workers at five of the six companies the agreement includes an increase ranging from 850 rand to 1,100 rand for 2017, an increase of between 6 percent to 7.5 percent in 2018 and an increase ranging between 7 percent and 8.5 percent in the final year.

For the sixth company, Delmas Coal, the agreement will see a 7.5 percent increase in 2017, an increase of consumer inflation plus 1 percent for 2018 and a 7.5 percent increase in 2019 for its lowest paid workers.

The agreement will be effective from June 1 for officials and July 1 for lowest paid workers at all companies with the exception of Koornfontein Mines, which will implement on July 1, and Delmas Coal, which will implement on July 1 for all employees.