JAKARTA (Reuters) - The U.S. embassy in Jakarta has issued a security alert ahead of election results due on Wednesday, as Indonesian authorities have arrested nearly 30 suspected militants, including some who police say are able to detonate bombs using Wi-Fi networks.

Presidential security squads (Paspampres) take part in a drill, ahead of the announcement of the presidential election results after the last month election, in Jakarta, Indonesia, May 14, 2019 in this photo taken by Antara Foto. Antara Foto/Hafidz Mubarak A/via REUTERS ATTENTION EDITORS - THIS IMAGE WAS PROVIDED BY A THIRD PARTY. MANDATORY CREDIT. INDONESIA OUT.

The embassy advised U.S. citizens to avoid areas where large demonstrations may occur in Jakarta, and in other cities including Surabaya in East Java and Medan in North Sumatra, in a statement that was dated on Friday, May 17.

Indonesian authorities have said they are heightening security ahead of May 22, when the official result of last month’s presidential election will be announced.

Indonesian National Police spokesman, Muhammad Iqbal, told reporters in a briefing on Friday that police this month have arrested 29 suspects linked to Jemaah Ansharut Daulah (JAD) - the largest Islamic State-linked group in the country - and confiscated at least five homemade bombs in various locations across Java and North Sulawesi.

Some of the suspects have had paramilitary training and went to Syria as foreign fighters, Iqbal said.

Indonesian police also revealed that some of the suspects have learned how to use Wi-Fi to detonate explosive devices, but it was not immediately clear how advanced their plans were.

Detonating bombs using a Wi-Fi network is considered a new technique, Dedi Prasetyo, another National Police spokesman, told Reuters on Tuesday, and gets around using phone signals, which can be jammed during rallies involving large crowds.

“If there is (cell phone) jammer, then phones are not operable but the Wi-Fi signal will not be disturb, especially when using signal amplifier,” Prasetyo said.

The police spokesmen did not answer or return phone calls on Saturday to get more information.

The police arrested EY, a local leader of JAD in Bekasi, near the capital Jakarta, on May 8 in the capital for plotting attacks during next week’s announcement of the presidential election. The police identified the suspect only by his initials.

JAD does not have an official spokesman, and it is not known if any of the suspects have retained legal representation.

“For this group, democracy is an ideology that they do not agree with,” Iqbal said on Friday, adding that the National Police advise people not to make unnecessary trips on the day the results are announced.

“This would be dangerous because they want to attack anyone, including officers, with bombs,” he said.

The arrests are part of the authority’s efforts to tighten security ahead of an announcement by the General Election Commission (KPU) on May 22, when nearly 32,000 police and military personnel will be on standby in Jakarta.

The announcement is expected to confirm unofficial counts by private pollsters that showed incumbent President Joko Widodo as having won the race, a result which has been publicly disputed by his contender, ex-general Prabowo Subianto.

Prabowo’s supporters have pledged to protest peacefully if the official result confirms Widodo’s victory, and large groups of people could be out in the streets after the announcement.