Three people were killed and 79 others injured in an explosion at a railway station in Urumqi, the capital of China's Xinjiang region, state media reported.

The explosion, which state news agency Xinhua called a "violent terrorist attack", came on the same day that President Xi Jinping ended a visit to the region.

China's official news agency Xinhua said attackers also slashed people with knives.

Four people were seriously injured but were "in a stable condition" after being sent to hospital for treatment, Xinhua reported, citing local Communist Party officials. 

President Xi urged "decisive actions" against "terrorists" after the attack.

"The battle to combat violence and terrorism will not alloweven a moment of slackness, and decisive actions must be taken to resolutely suppress the terrorists' rampant momentum," Xinhua quoted Mr Xi as saying