A mass stabbing at a Chinese train station late Saturday left 28 people dead and 113 injured in a "violent terrorist attack", state media said.

Victims described knife-wielding attackers dressed in black bursting into Kunming railway station in the southwestern province of Yunnan province and slashing indiscriminately.

Chinese President Xi Jinping called for "all-out efforts" in the investigation and for the attackers to be punished "in accordance with the law", the official news agency Xinhua said.

Beijing's top security official was heading to the scene.

The bloody assault which happened at around 9:20 pm (1:20 pm GMT) "was an organised, premeditated violent terrorist attack" carried out by "unidentified knife-wielding people", Xinhua reported, citing authorities.

Police shot dead five of the attackers at the train station and were hunting the rest, it said.

Yunnan has no history of violent attacks, and it was not immediately clear who carried out the attack, or what motivated it.

A knife victim named Yang Haifei, who was wounded in the chest and back, told Xinhua that he had been buying a train ticket when the attackers approached and had tried to escape with the crowd.

"I saw a person come straight at me with a long knife and I ran away with everyone," he said, while others "simply fell on the ground".