Tens of thousands of protesters have marched through the Bangladesh capital Dhaka in the biggest anti-France rally since President Emmanuel Macron defended cartoons depicting the Prophet Mohammed.

Muslims across the world have reacted furiously to Mr Macron's robust defence of the right to mock religion following the killing of a French schoolteacher earlier this month who had shown cartoons of the prophet to his pupils.

In Syria people burned pictures of France's leader, tricolour flags were torched in the Libyan capital Tripoli, while French goods have been pulled from supermarket shelves in Qatar, Kuwait and other Gulf states.

Protesters in Dhaka set alight to an effigy of President Macron during the march in which police said 40,000 people took part.

Hundreds of armed officers used a barbed-wire barricade to stop the demonstrators, who dispersed without violence before they could get close to the French embassy in the city.

The rally was called by Islami Andolon Bangladesh (IAB), one of the country's largest Islamist parties, and started at the biggest mosque in the nation, which is around 90% Muslim.

"Boycott French products", demonstrators chanted as they called for Mr Macron to be punished.

In the aftermath of the killing of school teacher Samuel Paty, Mr Macron issued a passionate defence of free speech and France's secular way of life, vowing that the country "will not give up cartoons".

A picture of Emmanuel Macron is burnt during a demonstration near the West Bank city of Hebron

France has been targeted in a string of jihadist attacks that have killed over 250 people since 2015 and led to deep soul-searching over the impact of Islam on the country's core values.

Some of the attackers have cited the Prophet Mohammed cartoons as well as France's ban on wearing the Islamic face veil in public as among their motives.

Several suspected Islamist radicals have been arrested in dozens of raids since Mr Paty's murder, and about 50 organisations with alleged links to such individuals have been earmarked for closure by the government.

Earlier this month, President Macron announced a plan to defend France's secular values against a trend of "Islamist separatism", and described Islam as a religion "in crisis".

Iraqi protesters burn posters during a demonstration at the French Embassy in Baghdad

Iran calls in French diplomat over comments

As the backlash over France's reaction to the cartoons widened, leaders from European nations including Germany, Italy, the Netherlands and Greece rallied behind Mr Macron.

However, Islamic and Muslim-majority nations have hit out and protesters have taken to the streets, though not in near the numbers seen in Dhaka.

Turkish President Recep Tayyip Erdogan - who has styled himself a defender of Muslims worldwide - has compared the treatment of Muslims in Europe to that of Jews before World War II, saying they were the object of a "lynching campaign".

"You are in a real sense fascists, you are in a real sense the links in the chain of Nazism," he said, after urging President Macron to have "mental checks".

Tehran has summoned a senior French envoy and the Saudi foreign ministry said on Twitter that it denounced "the offensive cartoons of the Prophet".

The Malaysian opposition leader Anwar Ibrahim slammed Mr Macron's comments on Islam being in crisis as "offensive" and "unreasonable", adding in a statement: "With freedom comes responsibility, a responsibility notably absent from the rabblerousing smears essayed by Monsieur le President."

The French president has also drawn fire in Pakistan and Morocco, while the Palestinian Islamist group Hamas, the Taliban in Afghanistan and the Lebanese Shiite movement Hezbollah have also spoken out against France.

More demonstrations are planned in Gaza, the West Bank, Israel and South Yemen.