Danish police have shot and wounded a man at the home of Kurt Westergaard, whose controversial cartoons of the prophet Muhammad sparked a storm of Muslim protest five years ago.

Danish media reported last night that Westergaard, 74, was at home near the city of Aarhus with his wife and grandchild when a 27-year-old Somalian man armed with a knife and axe tried to break in.

Chief superintendant Morten Jensen, from East Jutland police, said: "At 10pm a personal alarm was received from Mr Westergaard's house."

Officers found a man "armed with an axe and a knife in either hand," he said. "He broke a window of Mr Westergaard's house. He tried to attack one officer with an axe and he was shot in his right leg and his left arm." He said the man was not seriously injured and was now in custody.

In 2005 the Jyllands-Posten newspaper published a caricature by Westergaard depicting Muhammad wearing a turban shaped like a bomb with a fuse.

Islamic tradition says no image of the prophet should be produced or shown.

Danish embassies were attacked including the one in Damascus which was burned down in 2006 and death threats against Westergaard forced him into hiding.

In March 2008 Denmark's three main newspapers reprinted the cartoon after the arrest of three men for plotting to murder the artist.The three – a Dane of Moroccan origin and two Tunisians – were picked up in a dawn raid near Aarhus following a long surveillance operation by the country's intelligence services, the PET.

The Dane was eventually released without charge and one of the two Tunisians was deported. The other was sent to live in an asylum centre north of Copenhagen.

The Jyllands-Posten also carried a statement from the cartoonist revealing how he had feared for his life but then "turned fear into anger and indignation".

"It has made me angry that a perfectly normal everyday activity, which I used to do by the thousand, was abused to set off such madness," the statement added.

In today's Jyllands-Posten, Westergaard described the incident: "He threatened to kill me. I ran out to the bathroom where our security room is. I was worried for my grandchild. I was afraid.

"I knew that I could not match him. So I alerted the police. It was scary. It was really close. But we did it. It was good."

Westergaard was moved to a safe place last night but was unable to say what the attempted attack would mean for his future.

"It is too early to say. I must speak with PET and then we will see," he said.