The Danish Supreme Court has upheld a 10-year prison sentence for a Somali man who broke into the home of a cartoonist known for caricaturing the Prophet Muhammad.

The court says Muhideen Mohammed Geelle was guilty of a terror attempt for breaking into Kurt Westergaard's house with an ax in 2010 and rejected his claim he only wanted to frighten the cartoonist and not commit terror.

Westergaard rushed into a panic room and was unharmed.

The 76-year-old cartoonist has round-the-clock protection and bodyguards posted outside his home after receiving several threats since he published the cartoons in 2005.

The court on Wednesday also upheld previous rulings that Geelle be extradited from Denmark after serving his sentence.