ROME -- A man went on a rampage with a pickaxe in Milan at dawn Saturday, killing a passerby and wounding four others in an apparently random attack, police said.

Carabinieri paramilitary police in Milan said the 21-year-old attacker, an immigrant from Ghana, was taken into custody shortly after the attacks in a residential area on the northern outskirts of the city.

People working in cafes and other businesses near the attack told Sky TG24 TV that the man wildly swung a pickaxe, running down streets and ferociously striking passersby, mainly on the head. Pools of blood stained the streets.

A 40-year-old man died after being struck on the head with the pickaxe and suffering further blows to the abdomen while he lay on the ground, police said. The victim was described as an unemployed man who was heading to a cafe near his home.

Among those wounded was a man in his 20s who was helping his father deliver newspapers to newsstands; another was a man walking his dog.

At first it appeared five people had been wounded, but police later said the sixth person the attacker swung at darted into a doorway in the nick of time and escaped injury.

Two of the wounded were in critical condition.

Police said the motive was unclear.

''Police blocked him with difficulty. He was in an evident state of marked psychological stress," Col. Biagio Storniolo told reporters. Asked about the motive, Storniolo said the suspect ''was not being cooperative. He says only that he is hungry and has no home."

The man, identified as Mada Kabobo, 21, was jailed while he is investigated for murder and two counts of attempted murder for the two persons who were most critically wounded, police said.

First media reports said the man had ignored a 2011 expulsion order because he was not legally in the country, but police later clarified that the expulsion papers had not yet been issued because legal proceedings in southern Italy were pending. Police said they identified the suspect, who had no documents on him, from fingerprints.

Police said he was in the country illegally, and had previously been arrested in the Puglia region for alleged, theft, robbery, property damage and resisting public authorities.

Milan Mayor Giuliano Pisapia said the entire city was shocked that a man would go on such a rampage, ''killing one and wounding several, even gravely, just because he ran into them on his path."