KUALA LUMPUR (Reuters) - Malaysian police have arrested seven men with links to the Islamic State militant group who were planning attacks on non-Muslim places of worship and other targets, authorities said on Saturday.

The Muslim-majority country has been on high alert since gunmen allied with Islamic State (IS) carried out a series of attacks in Jakarta, the capital of neighboring Indonesia, in January 2016.

Six Malaysians were arrested in Johor state, north of Singapore, while a seventh, a Filipino member of the IS-linked Abu Sayyaf group, was detained in the eastern state of Sabah, in multiple operations between Feb. 27 and Mar. 15, Inspector-General of Police Mohamad Fuzi Harun said in a statement.

He said the six detained in Johor were members of an IS cell and included a 37-year-old technician who recruited new militants and was believed to be the mastermind of planned attacks on non-Muslim places of worship in the state’s capital.

A second suspect was a security guard who served as the cell’s advisor and ensured members kept their activities secret. A third man was tasked with buying firearms from a neighboring country and identifying targets for attacks, he said.

“All of them planned to escape to a neighboring country and seek shelter from members of a militant group there after successfully carrying out the plan,” Muhamad Fuzi said, without naming the country.

Authorities arrested three other members of the same cell in follow-up operations, including a 25-year-old restaurant worker who had been ordered to kidnap and kill police personnel.

Police also detained a 31-year-old Philippine national in Sabah, on Borneo island, who was said to be a trusted lieutenant to Abu Sayyaf group leader Furuji Indama and has links to Malaysian militant Mahmud Ahmad, Mohamad Fuzi said.

The man, wanted by the Philippines for his involvement in a a kidnap-for-ransom syndicate, was also an expert in making improvised explosive devices.

Mohamad Fuzi said the suspect had planned to carry out several attacks in Sabah and was responsible for making the state a safe haven for terror groups from the Philippines.

Malaysia has arrested hundreds of people over the past few years for suspected links to militant groups.

A grenade attack on a bar on the outskirts of the Malaysian capital, Kuala Lumpur, in June 2016 wounded eight people. Islamic State claimed responsibility for the attack, the first such strike on Malaysian soil.