Sean FitzPatrick, Willie McAteer, Pat Whelan face fraud charges in Dublin’s Court in Ireland

Irish prosecutors slammed Anglo Irish Bank's former chief executive and chairman and two ex-senior members of staff in court over their role in the "absolutely illegal" scheme of lending money to individuals, so they could buy the bank's own shares.

AIB's former leader Sean FitzPatrick, alongside the bank's ex-head of lending Patrick Whelan and ex-finance director Willie McAteer are currently in front of Dublin's district court to defend themselves against allegations that they illegally provided loans to clients to buy shares in the bank, which led to alleged financial irregularities at the lender during the credit crisis.

"Sometime around the 8th of July 2008, Anglo decided to do something the prosecution say was absolutely illegal," said Paul O'Higgins, prosecuting counsel, in Dublin Circuit Criminal Court.

"Prosecution says Whelan was very much involved in carrying out the transaction, McAteer was involved, but not as involved in carrying out the transaction, but knew all about them and FitzPatrick as chairman was told about the lending."

"How much exactly he knew about the transaction will be a matter for you. The prosecution will say he did nothing to stop it in any way and he authorised it."

The trial is tipped to be one of the longest in Irish criminal history due to the level of evidence that needs to be heard as well as the millions of documents the court has to plough through.

In 2008, the Irish government offered a blanket guarantee to its banks who were experiencing the credit crunch on the back of a massive property bubble with aggressive lending practises.

In 2010, Dublin had to accept a €85bn (£70bn, $115bn) bailout from the European Union and International Monetary Fund. To pay the bill, Ireland had to endure painful austerity measures and it took until December 2013 to formally exit the bailout programme.

Both the state bank guarantees and the bank bailouts have almost bankrupted Ireland's economy. Salaries have been cut and taxes have gone up to help pay debts resulting from the rescue.

AIB was renamed the Irish Banking Resolution Corporation (IBRC), Anglo Irish was nationalised in 2009 at the cost of €30bn from taxpayers. The group is still being wound down.

However in July 2012 FitzPatrick, Whelan and McAteer were charged for allegedly helping a group of 16 investors buy shares in the bank when it was in financial difficulties in 2008.