The cartoon by Mahmoud Shokraye of the Iranian MP Ahmad Lotfi Ashtiani that led to a sentence of 25 lashes. Public Domain

An Iranian MP who brought a case against a cartoonist that resulted in a sentence of 25 lashes has withdrawn his complaint after widespread condemnation of the artist's conviction.

Mahmoud Shokraye was found guilty of insulting Ahmad Lotfi Ashtiani, MP for Arak, the capital of Iran's central province of Markazi, in a cartoon he drew of the parliamentarian in Nameye Amir, a city newspaper.

In an unprecedented punishment for an Iranian cartoonist, a media law court in Arak handed down a sentence of 25 lashes, triggering domestic and international outcry among Shokraye's colleagues and human rights organisations.

Iran's semi-official Fars news agency reported on Monday that Ashtiani had withdrawn his complaint. Experts familiar with Iranian law said it would mean the cartoonist's conviction would be quashed.

In a statement, Ashtiani attempted to exonerate himself by blaming the court for the sentence of lashing, saying he merely sued the publication for defamation but the court, instead, condemned the cartoonist.

"Following my complaint against [Nameye] Amir for a series of unjust allegations, the court sentenced the paper's cartoonist to 25 lashes," he said in quotes carried by Fars. "I did so in protest at using unethical ways to make unjust allegations, therefore I hereby withdraw my complaint against this artist."

Shokraye's cartoon depicted Ashtiani in a football stadium, dressed as a footballer, with a congratulatory letter in one hand and his foot resting on the ball. In the cartoon, the MP's forehead – as in reality – had a dark mark, said to be the sign of a pious Shia Muslim, supposedly caused by frequent prostration during prayer.

It is believed that Shokraye drew the MP in order to highlight recent criticism of Ashtiani's perceived interference in Iranian sport.

In response to the artist's sentence, cartoonists launched a campaign of drawing new caricatures of the MP, with many Iranians and their colleagues across the world contributing by posting their cartoons online.

The campaign's idea initially came from Mana Neyestani, who himself fell victim to the state's aggression towards cartoonists in 2006 when he spent two months in jail for a cartoon deemed insulting to the country's Azeri ethnic minority. Neyestani is based in Paris and has recently published a graphic novel, An Iranian Metamorphosis, which tells the story of his kafkaesque time in jail.

Neyestani asked his colleagues inside the country to react in solidarity with Shokraye by drawing their own cartoon of the MP. The campaign forced officials in Iran's ministry of culture and Islamic guidance to protest at the cartoonist's conviction in a rare criticism of the country's judiciary.

Rowson, who is the chairman of the British Cartoonists' Association, said: "I'm delighted to hear that Ashtiani has withdrawn his complaint, proving once more the power of cartoons, and that you cross cartoonists at your peril."

Amnesty International reacted to the news with caution. "While we welcome news that Iranian cartoonist Mahmoud Shokraye will no longer be flogged for peacefully expressing his views, that doesn't change the fact that flogging is a cruel, inhuman and degrading punishment that is prohibited under international law," said Amnesty's deputy director for the Middle East and North Africa, Ann Harrison. "There is no place for it in any country's penal system. We are continuing to call on the Iranian authorities to remove it as a punishment in law instead of sentencing ever more people to lashes."

Jo Glanville, the editor of the campaigning group Index on Censorship, said: "It's great to hear some positive news for freedom of speech in Iran and to see that protest can effect results. This was an absurd attack on political commentary and satire. I hope that it will contribute to more freedom for political debate in Iran."

Nikahang Kowsar, a prominent Iranian cartoonist who fell foul of the authorities for portraying a prominent cleric as a crocodile, welcomed the news by saying it showed Iran still cared about its image in the international community. "I think the withdrawal was the result of the solidarity of Iranian cartoonists in support of their colleague as well as international exposure."

Despite the relief for Shokraye, dozens of journalists remain in jail in Iran.