The rally was called by Islami Andolon Bangladesh (IAB)
Tens of thousands of protesters marched through the Bangladesh capital on Tuesday in the biggest anti-France rally since President Emmanuel Macron defended cartoons depicting the Prophet Mohammed.
Muslims across the world have reacted furiously to Macron's robust defence of the right to mock religion following the murder of a French schoolteacher who had shown his pupils cartoons of the prophet.
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.
Turkish President Recep Tayyip Erdogan even compared the treatment of Muslims in Europe to that of Jews before World War II, joining calls for a boycott of French goods which Paris said had had minimal impact so far.
Erdogan found himself the target of French satirical weekly Charlie Hebdo which published an irreverent caricature of him on the front page of the magazine's latest edition scheduled to hit the newsstands on Wednesday.
The crude drawing showed the Turkish leader in T-shirt and underpants, drinking a can of beer and lifting up the skirt of a woman wearing a hijab to reveal her naked bottom.
"Ooh, the prophet!" the character says in a speech bubble, while the title proclaims "Erdogan: in private, he's very funny."
In a sharp retort, Ankara accused the magazine of "cultural racism."
In Dhaka, protesters set alight an effigy of Macron during the march on Tuesday, 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.
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. Bangladesh is around 90% Muslim.
"Boycott French products," demonstrators chanted.
Ataur Rahman, a senior Islami Andolon member, told the rally at the Baitul Mukarram national mosque: "Macron is one of the few leaders who worship Satan."
Rahman called on the Bangladesh government to "kick out" the French ambassador, while another protest leader, Hasan Jamal, said activists would "tear down every brick of that building" if the envoy was not ordered out.
"France is the enemy of Muslims," said Nesar Uddin, a young leader of the group. "Those who represent them are also our enemies."
The October 16 beheading of high school teacher Samuel Paty by a Chechen extremist had shocked France deeply.
Paty had shown his students some of the Mohammed cartoons that had led to the the massacre of 12 people at Charlie Hebdo in 2015.
Depictions of the Prophet Mohammed are seen as offensive by many Muslims, but in France such cartoons have become identified with a proud secular tradition dating back to the Revolution and the issue of freedom of expression.
In the aftermath of Paty's murder, Macron issued a passionate defence of free speech and France's secular way of life, vowing that the country "will not give up cartoons."
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 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 Paty's murder.
Some 50 organizations with alleged links to radical Islam, as well as a mosque outside Paris, have also been earmarked for closure by the government.
Earlier this month, Macron unveiled a plan to defend France's secular values against a trend of "Islamist separatism", and described Islam as a religion "in crisis."
'Offensive' cartoons, comments
As the backlash widened, leaders from European nations including Germany, Italy, the Netherlands and Greece rallied behind Macron.
The European Union warned that Erdogan's boycott call was a further setback to Turkey's already stalled bid to join the bloc.
But French Trade Minister Franck Riester insisted that "for now, this boycott is very limited, involving only some food items... and so much the better."
Turks themselves were divided about it.
Shopper Daim Kara said he supported a boycott "because they are threatening Turkey," in reference to the increasingly fraught ties between Ankara and Paris over the past months.
He was shopping at French supermarket chain Carrefour in Istanbul, although he was quick to point out he had bought Turkish products.
Others slammed an "irrational" move that would be "impossible to apply."
Still, anger in Muslim countries showed no sign of abating.
Tehran summoned a senior French envoy, the charge d'affaires, and the Saudi foreign ministry posted on Twitter a denunciation of "the offensive cartoons of the Prophet."
Malaysia's opposition leader Anwar Ibrahim slammed Macron's comments on Islam being in crisis as "offensive" and "unreasonable," adding in a statement: "With freedom comes responsibility."
Macron 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.
Chechnya's strongman leader Ramzan Kadyrov accused him of provoking Muslims and compared the French leader to a "terrorist."
More demonstrations were planned for later on Tuesday in Gaza, the West Bank, Israel and South Yemen.