Police fired teargas to disperse Kenyatta National Hospital nurses who had staged a strike in push for health workers' service allowance.
The health workers vowed not to continue with the strike despite pleas by KNH CEO Thomas Mutie.
Mutie had a letter from the President's office which was read to the nurses explaining the increment in house allowances.
But the striking nurses argued that the letter has not addressed all their needs and issues to do with the welfare of health workers.
Services at KNH were not affected by the stand-off which lasted several hours on Monday.
The union secretary general Albert Njeru had condemned the police for using teargas at the hospital.
"We urge the police officers to maintain security and not throw teargas at striking nurses," he told reporters at the scene.
Moments later, the Labour and Employment Relations court declared the strike illegal.
Lady Justice Maureen Onyango issued the order following a successful application by the hospital.
KNH, through lawyer Wilfred Mutubwa, says a majority of the persons invited by the union to go on strike are medical professionals who are already earning the health workers service allowance.
The hospital further argued that the strike is illegal. The case will be heard on September 20.