Earlier this year, the musician and Prabowo supporter Ahmad Dhani was sentenced to 18 months in jail for a series of tweets from 2017, including one thought to refer to that losing candidate in the 2017 race for Jakarta governor (“anyone who supports the blasphemer is scum and deserves to be spat in the face”). Mr. Dhani was charged under the Electronic Information and Transactions Law of 2008, which penalizes defamation online. But the opposition claims that the law has been used for political ends. Mr. Dhani has since gotten in trouble again, under the same law, for saying that opponents to a #2019ChangeThePresident rally he attended last summer were “idiots.”

I find few records of arrests of people charged with slandering opposition figures. That could be because government supporters do less bad mouthing; more likely, it says something about the selective enforcement of the law. (Mr. Joko is known to have close ties to the police.)

The president has also gone on the counteroffensive online. One campaigner for Mr. Joko made this case for resorting to disinformation to me last month: “Michelle Obama said, ‘When they go low, we go high.’ But it didn’t work. Trump won. So here, when they go low, we go lower.”

Pro-Joko buzzers likely are behind hashtags like #PrabowoJumatanDimana (Where is Prabowo during Friday prayers?): Mr. Prabowo comes from a multidenominational family and is known for not being especially devout. Another trending hashtag is #ManaKeluargamu (Where is your family?), a reference to the fact that Mr. Prabowo is separated from his wife and his only son lives overseas. And then there are the allegations that Mr. Prabowo’s campaign is somehow affiliated with ISIS in various ways.

It is extremely difficult to identify which claim or lie comes from the campaigns themselves, buzzers or outsiders, but together these messages have created a dangerous pattern: A political opposition lagging in opinion polls spreads misleading content online about the president, and he deploys state institutions to crack down on them even as his campaigners and supporters put out misleading material of their own. As much as Indonesia’s politicians have been warning the people about disinformation, it is largely they and their teams who are producing fake news.

One result is an election campaign that has been more snide than substantive and that, in the name of differentiating two candidates who aren’t distinguishable enough, harps on supposedly deep social and political divisions — “this great disconnect,” as one candidate for vice president put it — that may not really exist.

Another effect of these dirty tactics is to undermine the credibility of the system itself.

Mr. Prabowo’s team has already questioned the legitimacy of the election, citing problems with voter lists and other irregularities — it could be feeding a convenient line to fake-news peddlers. Meanwhile, the police arrested two people last week for claiming that the election’s results had already been predetermined by the election commission and that Mr. Joko will be said to have won 57 percent of the votes.

Mr. Joko’s likely victory over Mr. Prabowo on Wednesday will come as a relief to many Indonesian liberals and minority groups. Yet they should be worried about the latest practices of a president once heralded as a democratic reformer. That Mr. Joko’s government has chosen to respond to disinformation with disinformation signals a dangerous backsliding for democracy in Indonesia.

Ross Tapsell is a researcher and Indonesia specialist at the Australian National University’s College of Asia and the Pacific, in Canberra.

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: letters@nytimes.com.

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.