Thieves who used skimming equipment to steal from cash machines have been jailed at Dublin Criminal Court.
The president of Ireland's husband was one of their victims.
The gang installed a device on a cash machine used by Dr Martin McAleese which created a copy of his bank card and used it to withdraw 5,000 euros (£4,215) from his account.
Some of the thieves were caught with skimming equipment, including a laptop containing 1,900 credit card numbers.
They also had videos of customers typing their pin codes into bank machines.
George Cioara, 27, Vasile Martin, 36, Bogdan Scantei, 27, Vlad Condriuc, 25 and Adrian Morosan 19, all of no fixed abode, and Costel Asimioanei, 28, of Dara Court, Celbridge, Kildare, were jailed for between 16 months and 10 years.
A seventh man is awaiting trial while another of the accused is on the run.
Detective Garda Alan Murphy told the prosecution that Dr McAleese had reported 5,000 euros missing from his bank account.
After investigation CCTV video from the Ulster Bank in the Terenure area of Dublin showed Vasile Martin installing a device on a door of the bank's lobby in December 2009.
Asimioanei was monitored placing a spy camera on the cash machine inside the lobby shortly after.
Detective Murphy explained that bank customers have to scan their card to get into the lobby and that Martin had placed a skimming device over the scanner to record the details. The camera was then used to record the pin code as it was being entered.
Soon after the equipment had been installed, Dr McAleese's card was used by an authorised person at the bank and that afternoon two of the group came in and retrieved the devices.
Over the next two months, regular withdrawals were made from Dr McAleese's account at various locations around Dublin and Meath which added up to 5,000 euros in total.
The bank has reimbursed the victim from its own funds.
On 11 February, 2010, Morosan was observed in the same bank by a staff member who thought he looked suspicious.
After Morosan left, a camera and skimming device were found on the door and on the cash machine.
A fingerprint found on the back of the camera was matched to Morosan.
By 26 February 2010, gardai had put Asimioanei under surveillance and observed him driving to the same bank and installing another camera. Scantei was later seen entering the bank and removing the device.
Both men were arrested near-by and the equipment was found hidden in a hedge. In interviews they denied knowledge of the devices and knowing each other.
The court also heard how Garda Wayne Donnelly and a colleague stopped Cioara, Condriuc and another man in a Romanian registered BMW on 3 May, 2010.
They found the laptop containing skimming software, and footage of people entering pins along with 1,900 credit card numbers.
On 5 May 2010, gardai searched a room in Clarion Hotel in Liffey Valley, in Dublin, where they found Martin, Morosan and another man. A laptop was seized and all were arrested.
Judge Martin Nolan ordered five of the men, with the exception of Scantei, to leave the country when they are finally released and barred them from returning for 10 years.