At least three people have been killed and five others injured as a knife-wielding attacker went on a rampage in the Taiwanese capital Taipei.

The 27-year-old suspect set off smoke bombs at Taipei's main metro station on Friday, before running to another station in a busy shopping district, stabbing people along the way, Taiwanese Premier Cho Jung-tai said.

The suspect later died after falling from a building, according to Cho, while the motives for his attack remain unclear.

This type of violent attack is rare in Taiwan, a nation known for its low crime rates. The last significant incident of this nature took place over a decade ago in 2014.

Friday's attack unfolded amidst the evening rush hour, sending commuters into a panic. Social media videos captured the chaotic scenes as people fled from the violence.

Cho confirmed that the assailant detonated smoke bombs and Molotov cocktails at the crowded Taipei Main Station, a central hub linked to an extensive underground shopping area.

In a heroic attempt to intervene, a man was reportedly struck with a blunt object while trying to stop the attacker; he later succumbed to his injuries in the hospital.

Continuing his violent spree, the attacker proceeded to another subway station approximately 800 meters away, where he unleashed more smoke bombs and continued to stab victims.

In response to this shocking incident, Cho ordered increased security protocols at transport hubs including metro and railway stations, as well as airports. “We will investigate the suspect's background and connections to understand his motives and identify any potential accomplices,” he stated.

Taiwan's President William Lai echoed the sentiment, promising a thorough investigation into the attack.

The previous major violent attack in Taipei, which occurred in 2014, resulted in the deaths of four individuals on an underground train and left the nation in shock. The perpetrator was executed two years later.