The demonstrations came hours after US President Donald Trump sent France a message of solidarity in the wake of the attack.
Samuel Paty was beheaded on Friday in Conflans-Sainte-Honorine by an 18-year-old Moscow-born Chechen refugee who was shot dead by police.
French Prime Minister Jean Castex stood with citizens, associations and unions demonstrating on the Place de la Republique in Paris in support of freedom of speech and in memory of the 47-year-old teacher.
Some held placards reading “I am Samuel” that echoed the “I am Charlie” rallying cry after the 2015 attack on the satirical newspaper Charlie Hebdo, which published caricatures of the Prophet Mohammed.
A moment’s silence was observed across the square, broken by applause and a rendition of La Marseillaise, the French national anthem.
Demonstrators also gathered in major cities including Lyon, Toulouse, Strasbourg, Nantes, Marseille, Lille and Bordeaux.
Meanwhile, French authorities said they had detained an 11th person following the killing.
Anti-terrorism prosecutor Jean-Francois Ricard said an investigation for murder with a suspected terrorist motive had been opened.
At least four of those detained were family members of the attacker, who had been granted 10-year residency in France as a refugee in March, and who was armed with a knife and an airsoft gun, which fires plastic pellets.
His half-sister had joined the Islamic State group in Syria in 2014, Mr Ricard said. He did not give her name, and it was not clear where she was now.
The prosecutor said that a text claiming responsibility and a photograph of the victim were found on the suspect’s phone. He also confirmed that a Twitter account under the name Abdoulakh A belonged to the suspect. It posted a photo of the decapitated head minutes after the attack, along with the message: “I have executed one of the dogs from hell who dared to put Muhammad down.”
The attack has upset moderate French Muslims, and a group of imams in the Lyon region were holding a special meeting on Sunday to discuss what the group called “the appalling assassination of our compatriot by a terrorist who in the name of an uncertain faith committed the irreparable”.
The head of the world’s largest body of Muslim-majority nations also condemned the killing. In a statement from the 57-nation Organisation of Islamic Co-operation (OIC), the office of the general secretary, Yousef al-Othaimeen, reiterated the OIC’s “well-known position of rejecting all forms of extremism, radicalisation and terrorism for any reason or motive”.
The attack has provoked a strong international rebuke, with US President Donald Trump addressing the killing on Saturday night from a political rally in Janesville, Wisconsin.
“On behalf of the United States, I’d like to extend my really sincere condolences to a friend of mine, President (Emmanuel) Macron of France, where they just yesterday had a vicious, vicious Islamic terrorist attack — beheading an innocent teacher near Paris,” he said.
“France is having a hard time and Macron’s a great guy.”