Police snipers shot dead a 30-year-old man who had taken two women hostage inside a Durban hospital Friday, ending a nearly five-hour standoff, a spokesman said.

"The suspect was shot by police snipers in the head. He has succumbed to his wounds," police spokesman Jay Naicker told reporters outside Westville Hospital.

Police believe the man was a teacher who suffered from bipolar disorder, and was receiving treatment at the hospital, Naicker said.

The attacker allegedly hijacked a taxi and forced the driver to take him to the hospital.

"The suspect demanded to see a doctor or nurse and became impatient and began firing shots randomly," Naicker said.

Three people were injured during the shooting, possibly by shrapnel from bullets hitting the concrete walls.

He then took two kitchen staff hostage, holding both women inside a first-floor room, Naicker said.

Allison Bull, spokeswoman for Chubb Security which provides guards for the hospital, said that guards did not return fire.

Mark House, a patient being treated for depression, was chatting to his wife on the phone when he heard the gunshots and two hospital staffers ran into his room to hide.

"I thought I was going to die. I thought, he will follow them in," House told AFP.

"People were screaming. I could hear his muffled voice over the screams," House said. "He was walking around the ward. He was a few metres away from my room."

"The next moment, the door swung open, I froze, I thought it was him. It was the police. They evacuated me out."

South Africa has one of the world's highest crime rates, putting it among the deadliest countries on the planet outside of war zones.