“It is not our intention to infringe on anyone’s freedom of expression or their right to voice an opinion,” said Eugênio Ricas, the director of the Federal Police’s organized crime division, who is leading the fake news task force. “The big question is when does a personal opinion become a lie about a candidate that is published with the specific intent of harming them and in doing so interfering with an election.”

Judicial officials say the task force is studying the tactics used by groups that have been active in spreading fake news in the past and assessing under which current laws they could most effectively be charged. They have also been consulting and negotiating with American technology companies, including Google, Twitter, Facebook and WhatsApp, in hopes of turning them into partners in the fight against fake news rather than targets of enforcement actions and fines.

If their initiative succeeds, Brazilian officials say that the October election, which will take place in a deeply polarized society, could serve as a template to address a problem that has undermined faith in democracy across the world.

But officials acknowledge that they are up against vexing legal, technological and ethical quandaries. Key among them is a 2014 law that gives internet users in Brazil strong privacy and freedom of expression protections.

While officials are mainly concerned about fake news strategies deployed by rival campaigns, not a foreign power, they caution that such tactics are often planned and executed abroad, which makes shutting them down difficult.