Image caption Officers Levay, Pichardo and Kozicki were in hospital in stable condition, city officials said

Three New York City police officers have been wounded in two separate shooting incidents just an hour apart.

One was shot in the leg and groin and another in the back after confronting a suspicious man on a train on Thursday night, police said. A wounded officer shot and killed the gunman.

A third policeman was shot in the leg while attempting to stop a robbery.

All three were in stable condition in hospital. The shootings come as the city enjoys a long period of low crime.

In 2012, the city suffered 414 homicides, the fewest in recorded history, city officials said. Likewise, the number of shootings last year was the lowest in history, city officials said.

After Thursday's shootings Mayor Michael Bloomberg called for stricter gun control measures.

"In recent weeks, we've heard some people say that the only thing that stops a bad guy with a gun is a good guy with a gun," he told reporters on Thursday night.

"But sometimes the good guys get shot - and sometimes, they are killed."

Saved by vest

At 19:30 local time (00:30 GMT), plain-clothed officers Lukasz Kozicki and Michael Levay were on a subway train in Brooklyn when they saw a man move between carriages, city officials said - a clear violation of subway rules.

When they confronted the man and asked for identification, he drew a handgun and opened fire, police said.

Officer Kozicki, 32, was struck three times - once in each of his thighs and once in the groin, officials said. Officer Levay, 27, was shot in the back but saved by his bulletproof vest.

Police Commissioner Raymond Kelly told reporters Officer Levay was able to return fire, killing the unnamed gunman. Both officers were in hospital in stable condition.

An hour earlier in New York's Bronx borough, Officer Juan Pichardo was off duty at his family's car dealership. Two men entered, one armed with a handgun, and announced a robbery.

Officer Pichardo struggled with the robber and was shot in the right thigh, Mr Kelly said.

Though wounded, Officer Pichardo and an employee of the dealership wrestled with the gunman and subdued him, Mr Kelly said.

The officer was in stable condition in hospital. The gunman and three accomplices were arrested.