JAKARTA, Indonesia — Members of Indonesia’s anti-terrorism police squad on Wednesday shot and killed two suspected militants who they believe were connected to a deadly suicide attack at a Catholic cathedral in the southern Philippines, and arrested 18 others, officials said.

The two men, Muhammad Rizaldy, 46, and his son-in-law, Sanjai Ajis, 23, were fatally shot by police after they resisted arrest by wielding a machete and an air-rifle during a raid at a house in Makassar, the capital of South Sulawesi province, said National Police spokesperson Ahmad Ramadhan.

The suspects were linked to a banned militant organization responsible for a series of attacks in Indonesia, a local affiliate of the Islamic State group known as Jemaah Anshorut Daulah, Ramadhan said.

He said members of the counterterrorism squad were initially to arrest the two men for their alleged role in the Jan. 27, 2019, suicide bombing at Our Lady of Mount Carmel Cathedral in Jolo town in the Philippine province of Sulu that killed 23 people and wounded nearly 100.

Authorities in Indonesia and the Philippines believe the attack was carried out by an Indonesian couple, Rullie Rian Zeke and Ulfah Handayani Saleh.

“The two slain suspects were involved in sending funds to the suicide bombers for the attack at a cathedral in the southern Philippines’ Jolo town,” Ramadhan said of Rizaldy and Ajis, adding that police were still conducting an investigation at their house in Makassar.

Ramadhan said the two men were also accused of harboring Andi Baso, another suspected militant who was involved in a 2016 church attack in Samarinda city on Indonesia’s Borneo island that killed a 3-year-old girl and wounded several other children. He said Indonesian authorities believe that Baso has fled to the southern Philippines and joined with a militant group there.

The two are believed to have been members of a militant Jemaah Anshorut Daulah cell who pledged allegiance to Islamic State group leader Abu Bakr al-Baghdadi in 2015. They tried to go to Syria in 2016 but police foiled their attempt at the airport.

Ramadhan said police also arrested 18 other members of the cell during Wednesday’s raid, and one of them was hospitalized with gunshot wounds after resisting arrest.

Indonesia has been battling militants since the 2002 bombings on the resort island of Bali that killed 202 people, mostly foreign tourists. Attacks aimed at foreigners have been largely replaced in recent years by smaller, less deadly strikes targeting the government, police and anti-terrorism forces, inspired by Islamic State group attacks abroad.

Indonesian police have been criticized for shooting suspects rather than trying to arrest them. Authorities say they are forced to defend themselves.