The 28-year-old Somali was carried into court on a stretcher
A Somali man has been charged with trying to kill a Danish artist whose drawing of the Prophet Muhammad sparked riots around the world.
The suspect, who was shot by police outside cartoonist Kurt Westergaard's home in the city of Aarhus on Friday, was carried into court on a stretcher.
Police say he broke into the house armed with an axe and a knife.
The suspect, who denies the charge, was remanded in custody. Police say he has links with Somali Islamist militants.
The radical al-Shabab group in Somalia hailed the attack.
I locked myself in our safe room and alerted the police. He tried to smash the entrance door with an axe, but he didn't manage
Al-Shabab spokesman Sheikh Ali Muhamud Rage told AFP news agency: "We appreciate the incident in which a Muslim Somali boy attacked the devil who abused our prophet Mohammed and we call upon all Muslims around the world to target the people like" him.
The suspect, who cannot be named for Danish legal reasons, was charged with attempted manslaughter.
The BBC's Julian Isherwood in Copenhagen says he was wearing bandages on his arm and leg and a cloth over his head to conceal his identity as he was carried into court for a remand hearing in Aarhus.
Police say the 28-year-old suspect broke into Mr Westergaard's home and shouted in broken English that he wanted to kill him. He is also alleged to have attacked police with an axe when they arrived at the scene.
The 74-year-old cartoonist, who was in the house with his five-year-old granddaughter, raised the alarm from a specially designed panic room.
The accused denied the charges, but reportedly did admit to being at the scene.
Kurt Westergaard's home was supposed to be heavily fortified
The judge remanded him in custody for four weeks, two of which are to be spent in isolation.
Earlier, police said the suspect, who had a permit to stay in Denmark, had been shot in the knee and the shoulder.
And Jakob Scharf, who heads the Danish intelligence service PET, said the alleged attack was "terror related".
The assailant had close contacts with al-Shabab, Mr Scharf said, and had been under surveillance for activities unrelated to Mr Westergaard.
A prominent member of the Somali community in Denmark, Ahmed Daqane, told the BBC that Somalis there had to be more vigilant about extremism.
"They have to take care of themselves and talk to the young people who are doing wrong things and misusing Islam," he said.
The shaken cartoonist told Danish news agency Ritzau: "I locked myself in our safe room and alerted the police. He tried to smash the entrance door with an axe, but he didn't manage."
SOMALIA'S ISLAMIST REBELS
Al-Shabab, meaning "the lads" in Somali, is on US foreign terror list
Youth wing of Somalia's Union of Islamic Courts that once held sway
Re-emerged after UIC ousted by Ethiopian troops in late 2006
Accused of al-Qaeda links and trying to topple interim government
Accused of Dec '09 suicide bomb on Mogadishu doctors' graduation
Blamed for 2008 stoning of 13-year-old Somali 'gang rape victim'
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.