Seven Kenyan medical union officials, jailed for their role in a strike that has crippled public hospitals, were freed Wednesday ahead of their appeal and will resume negotiations with the government.

A labour court had sentenced the Kenya Medical Practitioners, Pharmacists and Dentist Union officials to a month in jail on Monday.

Their sentencing prompted their union to say it was calling off talks with the government to end the strike, which began on December 5 in state hospitals.

Representatives of some 5,000 doctors in the public sector argue that their primary demand -- a four-fold increase in pay -- was already part of a collective bargaining agreement signed in 2013 but never brought into effect.

The court on Wednesday freed the seven until the date of their appeal on February 23.

Until then they will be allowed to resume negotiations with the government in a bid to end the work stoppage of more than two months which has closed public hospitals and prevented access to basic care.

Kenya's labour court had handed suspended sentences to the union officials a month ago after they ignored an earlier court order to end the strike.

But Judge Hellen Wasilwa jailed them on Monday for contempt of court, arguing that the seven had provided no reason for punishment to be deferred.

Doctors have rejected a government offer to increase their salaries by 40 percent, according to union officials.

The strikers, who also denounce endemic corruption, have the support of many Kenyans. Apart from their pay rise, they are demanding better equipment for public hospitals.

Press reports recently pointed out that a member of parliament earns three times as much each month (more than 10,000 euros /$10,600) than the best-paid surgeons in the country.

With elections due in August, the doctor's strike is a thorny issue and potentially damaging for President Uhuru Kenyatta, who will be seeking a second term in office.