Iran has shut down a Tehran-based French institute over cartoons of its supreme leader published in the French magazine Charlie Hebdo.

This comes after the magazine published caricatures mocking Ayatollah Ali Khamenei as a mark of support for the ongoing anti-government protests in Iran.

Tehran deemed the cartoons insulting and has threatened to take further action if France does not "hold to account the perpetrators and sponsors of such instances of spreading hatred."

Iran's foreign ministry said in a statement that the shutting down of the institute is the first of several steps it plans to take in protest against the French weekly.

"The insulting and indecent act of a French publication in publishing cartoons against the religious and political authority will not go without an effective and decisive response," wrote Iran's Foreign Minister Hossein Amir-Abdollahian in a Twitter post.

"We will not allow the French government to step over its carpet. They have definitely chosen the wrong path. Earlier, we included this publication in the sanctions list," added the tweet.

Charlie Hebdo published several cartoons mocking the political leaders of Iran. One of the cartoons shows Khamenei clinging to a throne above the raised fists of protesters.

They were part of a competition launched by the magazine in December in support of the protests underway in Iran, per a BBC report.

The magazine said that the competition was launched as a symbol of support for "the struggle of the Iranians who are fighting for their freedom, by ridiculing this religious leader from a bygone age."

Iran has been witnessing massive protests since September last year, after the death of a young woman named Mahsa Amini. She was detained by the country's morality police for allegedly wearing her hijab "improperly."

Charlie Hebdo's offices were attacked in 2015 following the publication of a caricature of the Prophet Muhammad. Twelve people, most of them Charlie Hebdo staff, were shot dead at the magazine's offices in January 2015 by French brothers of Algerian origin.

Iran presidential election
Iran's Supreme Leader Ayatollah Ali Khamenei speaks to the audience in Tehran Handout via Reuters