PARIS — Police officials in the southern French city of Nice questioned an 8-year-old boy who is believed to have made comments in school defending the gunmen who killed 17 people in terrorist attacks in and near Paris this month, a senior regional police official confirmed on Thursday.

The questioning of the boy, which occurred Wednesday, grabbed headlines across the country and spurred a debate on social media and elsewhere about whether France’s desire to combat terrorism was tipping over into hysteria. Since the attacks, France has moved to enforce tough new laws against the incitement of terrorism, fueling tensions between free speech and public order.

The boy was identified as a Muslim by the French National Observatory Against Islamophobia. His name was not released because he is a minor. The authorities said he first aroused notice at his school after he refused to observe the minute of silence honoring the victims of the Paris attacks, according to Fabienne Lewandowski, the deputy director of security in the Alpes-Maritimes department. She said the boy later lashed out at the journalists of Charlie Hebdo, the satirical newspaper that was targeted in the attacks, and defended the terrorists, who were killed by the police on Jan. 9.