Taiwan police said they have arrested three out of 16 foreign suspects over a $2.5 million (S$3.4 million) cyber theft using malware to hack into the cash machines of a local bank's ATM network.

The suspects are accused of targeting the First Commercial Bank's ATM networks last week and withdrawing more than NT$81 million (S$3.4 million) from dozens of machines in three cities.

The police arrested a Latvian suspect, identified as Andrejs Peregudovs, in the north-eastern country of Yilan. He was spotted by an off-duty police officer from Taipei.

Two other suspects from Romania and Moldova were also arrested by the police on Sunday from a hotel in Taipei. "This is the first time that an international team of ATM thieves has committed a crime in Taiwan," Lee Wen-chang, chief commander of the Criminal Investigation Division, told Reuters.

The officials believe that the heist was carried out by a 16-member international group.

Although the police have recovered more than half of the stolen money they are searching for the rest. "We will continue to search for the rest of the stolen money to let international hackers know that Taiwan is not a crime haven," the police said in a statement.

The remaining 13 suspects, including five from Russia, have left Taiwan after committing the crime. Police have alerted authorities overseas and have sought assistance from both Interpol and Russia's de facto embassy in Taiwan.

The bank released images of the surveillance cameras that showed masked robbers working in two-man teams targeting 41 First Commercial Bank ATMs in three cities.

The investigators have identified three different malware programmes that were used to trigger the ATM withdrawals.

After the theft was discovered, Taiwan's major state-run banks have frozen withdrawals from almost 1,000 ATMs of the same type targeted in the heist.