Image copyright AP Image caption The attack happened near a metro station in Taipei, reports said

A four-year-old girl has been beheaded in the Taiwanese capital, Taipei, in what appears to have been a random attack, local media say.

The attack is said to have taken place as the child was cycling towards a metro station with her mother.

The girl was grabbed from behind and killed with a cleaver. The attacker was wrestled to the ground by passers-by.

Police told the Taiwanese Central News Agency (CNA) that he had a history of mental illness.

The mother told CNA that her daughter had been unable to ride her bike on to a pavement and she thought the man was coming to help her. Instead he began attacking her.

"I saw the suspect slashing my daughter with a cleaver. I immediately grabbed him but I could not pull him away."

Angry crowd

She said she screamed for help and people rushed to pin the man down until police arrived.

An angry crowd later gathered outside the police station where the man - named only as Wang, 33 - had been taken, CNA reported.

He had a record of drug abuse and had been treated for mental illness, the agency added.