Thousands of doctors working in Kenya's public hospitals have agreed to end a 100-day strike after reaching a deal with the government on Tuesday that aims to address their grievances.

More than 5,000 health workers calling for nearly a 300 percent increase in pay went on strike in December, but it was not clear how much of their demands were met.

The government and union officials signed a deal to address pay and other issues in dispute, said Ouma Oluga, secretary-general of the Kenya Medical Practitioners, Pharmacists and Dentists Union.

Oluga said the biggest achievement in the agreement is that doctors now will work just 40 hours a week and will be compensated for extra hours. Previously, doctors in public hospitals were on call at all times.

"It's a win-win for everybody," Oluga said.

Public doctors in Kenya, who train for six years at universities, earn a basic salary of only $400-$850 a month.

"It is regrettable that it took so long. Kenyans have suffered ... We cannot fathom the extent of pain which Kenyans felt in the 100 days," said Kenya's Health Minister Cleopa Mailu.

Dorcas Kiteng'e: A victim of Kenya's doctors' strike

Dozens of people died during the strike as the majority of Kenyans cannot afford private healthcare.

The doctors pushed for the implementation of a 2013 collective-bargaining agreement that committed the government to increase pay and restore dilapidated public health facilities, among other issues. It also set out measures to address the East African country's huge shortage of doctors.

The government said it does not recognise the 2013 agreement.

The Kenyan government on Friday started cracking the whip on the striking doctors by firing them en masse for missing work without reason and taking part in an illegal strike.

The government withdrew a 50 percent pay rise offer among other benefits that were meant to woo the doctors back and warned that it would not "succumb to threats and intimidation". It ordered the doctors to resume work or face disciplinary action.

Al Jazeera's Catherine Soi, reporting from a missionary hospital in Nairobi, said the healthcare situation is dire.

"The impact of the strike is very severe. Hospitals are overwhelmed. Beds are packed end to end. Hundreds of patients are lining up to be treated," Soi said.

The strike comes amid fierce criticism of the government of President Uhuru Kenyatta, who is seeking re-election in August when the East African nation holds presidential and parliamentary elections.

Politicians are investigating allegations that tens of millions of dollars have gone missing from Kenya's Ministry of Health and the National Youth Service.