A Danish newspaper apologised today to eight Muslim organisations for the offence it caused by reprinting controversial cartoons depicting the prophet Muhammad, in exchange for their dropping legal action against the newspaper.

Politiken reached a settlement with the groups, which represent 94,923 of Muhammad's descendants, in which it agreed to print an apology for the affront the cartoons caused. The newspaper has not given up its right to publish the cartoons and has not apologised for having printed them as part of its news coverage.

In a joint statement, the two sides said they wanted to "express their satisfaction with this amicable understanding and settlement, and express the hope that it may in some degree contribute to defusing the present tense situation".

The decision to issue an apology for the offence caused has been met, however, by widespread condemnation from the Danish media and political parties.

The editor of Jyllands-Posten, which originally printed the cartoons in 2005 and is published by the same media company as Politiken, said that its sister paper had failed in the fight for freedom of speech and called it a "sad day" for the Danish press.

Kurt Westergaard, one of the cartoonists, who earlier this year was the subject of an attempted attack at his home, said the newspaper had betrayed its duty to freedom of speech. "In Denmark we play by a set of rules, which we don't deviate from, and that's freedom of speech," he told the newspaper Berlingske Tidende. "Politiken is afraid of terror. That's unfortunate and I fully understand that."

The leader of the rightwing Danish People's party, Pia Kjærsgaard, called the situation absurd, and said that Politiken had sold out. She urged Danish newspapers to reprint the cartoons as a protest against Politiken's settlement. "It is deeply, deeply embarrassing that [Politiken's editor] Tøger Seidenfaden has sold out of Denmark's and the west's freedom of speech. I cannot distance myself enough from this total sellout to this doctrine," Kjærsgaard said.

The leader of the Social Democrats, Helle Thorning-Schmidt, also criticised Politiken's decision: "It's crazy. The media carries offensive material every day. That is what freedom of speech is about."

The prime minister and the newly appointed foreign secretary have not commented on the settlement.

Last year 11 Danish newspapers were contacted by the Saudi lawyer Faisal Yamani, who demanded that the Muhammad cartoons were removed from their websites, that the newspapers print an apology and that they promise not to use the cartoons again.

Seidenfaden initially refused Yamani's request for an apology, saying it was the paper's duty to print the cartoons as part of its news coverage after Westergaard became the subject of an alleged murder plot.

Yamani, the lawyer who negotiated the settlement on behalf of the descendants, said: "This is a good settlement. It would be wrong to speak of a victory. Both parties have reached the point where they understand the background to what has happened. Politiken is courageous in apologising, even though its was not their intention to offend anyone."

In September 2005 the Danish newspaper Jyllands-Posten published a series of cartoons depicting Muhammad, in what it described as an attempt to promote freedom of expression. The cartoons initially had little impact, but when they were reprinted by Norwegian newspapers a storm erupted, with violent protests across the Middle East.

In February 2006 the violence escalated as newspapers in France, Germany, Spain and Italy reprinted the caricatures. The offices of Jyllands-Posten had to be evacuated several times after security threats.

Protests spread to other Arab countries and Danish goods including Lego and Bang & Olufsen were boycotted by Saudi Arabia, Libya and Syria. The Danish embassy in Damascus was burned down in 2006, others were attacked and death threats forced Westergaard into hiding.

Westergaard's caricature of a bearded man with a bomb in his turban became the most talked about of the cartoons, but he has said the man in the drawing didn't "necessarily" depict Muhammad.

According to some Islamic traditions, it is blasphemous to make or show an image of the prophet.

• This article was amended on 1 March 2010. Not all branches of Islam consider it blasphenmous to make or show images of the prophet Muhammad. This has been clarified.