JAKARTA--Indonesian President Joko Widodo said on Friday he had ordered tighter security for state officials a day after a suspected Islamist militant stabbed the chief security minister as he was greeting crowds in a provincial town.

Indonesia, which is the world’s biggest Muslim-majority country, is grappling with a resurgence in militancy and hundreds of suspects have been detained under tighter new anti-terrorism laws since the beginning of 2019.

Minister Wiranto, 72, who like many Indonesians uses just one name, underwent surgery in Jakarta after sustaining two wounds to the stomach in the attack after he opened a university building in Pandeglang town.

He was the first senior politician to be attacked in recent years and the president said he should be the last.

"Even when we already have security measures in place, they should be tightened so that what happened to Wiranto won't happen again," Widodo told reporters at the hospital after visiting the minister.

"He is getting better, he was able to communicate with me," Widodo said, adding that the security minister had asked to take part in government meetings.

Police arrested a man and a woman they suspected were a couple, and confiscated sharp objects that they were carrying, including knives and scissors.

The head of Indonesia's main intelligence agency, Budi Gunawan, said that the perpetrators were affiliated with the Islamic State-linked militant group Jamaah Ansharut Daulah (JAD).

The government scrambled to tighten its anti-terrorism laws after a series of suicide bombings linked to the JAD group killed more than 30 people in the city of Surabaya last year.

The attack came days before Widodo is due to be sworn in for a second term in office on Oct. 20.

Luhut Pandjaitan, the coordinating minister overseeing maritime and natural resources, told reporters on Friday that the attack would not have an impact on the inauguration.

Wiranto has served as chief security minister in Widodo’s Cabinet since 2016.

A retired general, he is considered a product of the late former strongman Suharto’s “New Order” administration, which gave a big political role to the military and stifled opponents.

His appointment drew criticism from rights groups for his involvement as chief of the armed forces in the bloody upheaval in East Timor.

Wiranto was indicted by a U.N. panel over the bloodshed surrounding East Timor's 1999 independence vote, when about 1,000 people were killed. He denied any wrongdoing in East Timor.