Two former Anglo Irish bankers have been found guilty of handing out illegal loans, but still avoid prison. (Reuters)

Two former Anglo Irish bank executives have avoided imprisonment, even though they were found guilty of providing illegal loans of millions of euros from the bank prior to its financial collapse.

The bank's former head of lending, Patrick Whelan, and former chief risk officer, William McAteer, were found guilty of 10 counts each of banking fraud. The men authorised secret loans worth up to €450m (£369m, £621m) to 10 clients, who were in turn to use the money to buy Anglo Irish Bank's faltering shares.

Whelan and McAteer intended to transfer future control of Anglo Irish away from Ireland's one-time richest man Seán Quinn. In 2008 the bank tried to sell control of "future" shares to the Maple 10 group of wealthy investors. This transaction has since been deemed illegal.

However, Justice Martin Nolan spared the bankers prison because regulatory controls in place at the time failed to flag up the scheme as unlawful.

The judge told the Dublin court: "I find it incredible that red lights did not go off somewhere in the regulator's office."

Whelan, 52, and McAteer, 63, were instead given community service, much to the dismay of the Irish public who had to pay more than €30bn in taxes after the bank collapsed in 2009.

The pair's lawyers claimed that they didn't know that they were doing anything against the law, with the both of them also stating that they had been given the go-ahead by the regulator.

Whelan's senior counsel, Brendan Grehan, said: "Whelan didn't for one moment think he was involving himself in something that was unlawful, something that would find himself before a court on indictment."

The bank's former chairman, Sean FitzPatrick, was cleared of any unlawfulness in the trial. FitzPatrick, 65, was in charge in 2008 when the scheme was hatched.