Police fatally shot five men who were allegedly planning to rob money changers, jewelers and other targets on Indonesia\'s resort island of Bali in a suspected bid to fund terrorist attacks, officials said Monday. Several semiautomatic guns, magazines of ammunition and masks also were recovered during separate raids on a bungalow and a boarding house late Sunday, said Saud Usman Nasution, a national police spokesman. \"We believe they were trying to get money to finance other (terrorist) activities,\" he said, adding the alleged ringleader, Hilman Jayakusuma, had been on a most wanted list for more than two years. The elite anti-terror unit opened fire after the suspects tried to escape with guns blazing, said Hariadi, a police spokesman on Bali. It was not immediately clear if any officers were wounded. Nasution said Jayakusuma, 32, was believed to be connected to a militant group uncovered in February 2010 following the discovery of a jihadi training camp in westernmost province of Aceh. According to convicted militants, the cell\'s goal had been to raise money through armed robberies and other illegal activities so they could launch a series of gun attacks on Western targets and carry out high-profile assassinations. Indonesia, the world\'s most populous Muslim nation, has been hit by a string of terrorist attacks in the last decade, including the 2002 suicide bombings on two crowded Bali nightclubs that left 202 people dead, most of them foreign tourists. There have been other deadly attacks since then targeting an embassy, hotels and restaurants, almost all blamed on the al-Qaida-linked militant network, Jemaah Islamiyah, and a violent splinter group. Just as the country was enjoying a lull in bombings — thanks in part to the arrest and convictions of hundreds of militants — authorities in discovered the jihadi training camp in Aceh. A string of armed robberies have since been blamed on that group, most of them on the island of Sumatra. Police got a tip that the men — including Jayakusuma, who was linked to a particularly violent robbery on a bank Sumatra\'s capital, Medan — arrived on Bali late Saturday, said Hariadi, a spokesman for the local police. They slept in different places the first night and regrouped Sunday morning to survey potential targets, he said. In addition to weapons and masks, authorities found several sketches of their intended robbery targets. Members of Detachment 88 swooped in Sunday night to surround a bungalow used by the suspects near Sanur beach and a boarding house nine miles (15 kilometers) away, sparking the deadly shootouts.