An elderly man was attacked with a machete in Dusseldorf on Friday, hours after a similar attack by a mentally ill asylum seeker wielding an axe left nine people injured at the city's train station.

The 80-year-old machete victim, who has not been named, was rushed to hospital after being assaulted in a car park on the northern outskirts of Dusseldorf. His attacker remains at large.

Teachers and students at the nearby Theodor-Fliedner-Gymnasium were told to stay indoors, while police cordoned off a woodland area near Kalkumer Schlossallee, the site of the car park.

Hours before he was attacked, a 36-year-old man from Kosovo wounded nine passengers with an axe at Dusseldorf train station before trying to escape by jumping from a bridge onto a street, where he was arrested.

Prosecutors said the man, named locally as Fatmir H, came to Germany in 2009 and was granted temporary residency for humanitarian reasons.