Fuerza Pública officers shot it out with a suspected armed robber Sunday afternoon near the Hospital de Heredia.
The action started when four men stuck up a supermarket, Super Mayka, in Barreal de Heredia, took the cash registers and stripped a guard of his weapon.
Officers in a patrol car located the robbery vehicle at a car wash in Santa Cecilia. not far from the hospital. Witnesses said two men fled in a taxi and two had entered a nearby coffee plantation.
The two suspects on foot led police on a chase. One with a revolver in one hand and a pistol in the other engaged police and fired at them four times, said the security ministry. In the return fire he was wounded in the leg, officers said.
Some of the shooting took place on the grounds of the hospital, police said.
The two men who were detained are illegal Nicaraguan immigrants, said police.