The Court of Appeal has granted bail to former solicitor Michael Lynn.

The 49-year-old, with an address in Maynooth, Co Kildare, faces 21 charges at Dublin Circuit Criminal Court in relation to the alleged theft of almost €30m from seven financial institutions.

The trial is due to take place in January 2020.

Mr Lynn was extradited to Ireland in March from Brazil where he had been living for a number of years. He was taken into custody in Brazil in August 2013.

He was refused bail in the High Court in April and appealed that decision. His lawyers told the Court of Appeal that he had already been in custody for a substantial period of time.

The court also heard that Mr Lynn's wife and four children were now living in Ireland and "even the family dog" had been brought back from Brazil.

Lawyers for the Director of Public Prosecutions opposed the appeal, pointing out that the High Court had already ruled against him after a lengthy hearing.

But the Court of Appeal ruled that the court had to take into account the amount of time Mr Lynn had spent in custody.

He has now spent almost five years in jail in Brazil and in Dublin and it will be another 18 months before he goes on trial here.

Mr Justice John Hedigan said such a delay was very disturbing and was a factor the court must take into account.

The judge said it was not possible to find that there was no flight risk but he said the risk of Mr Lynn leaving the country before his trial was now "much diminished".

He had a family of four young children and there was almost nowhere he could flee to from where he could not be retrieved and jailed again.

Mr Justice Hedigan said Mr Lynn's wife had "expressed movingly" the tragic situation the family found themselves in and how they longed for his presence in the home.

The court imposed a number of bail conditions.

Mr Lynn has surrendered his passport and must not apply for a new one.

His wife and children must also surrender their passports.

He must observe a curfew at his home in Maynooth between 9pm and 6am and sign on daily at Leixlip Garda Station.

He must stay away from all ports and airports and must not leave the jurisdiction.

An independent surety has been offered by Mr Lynn's sister and husband in the sum of €100,000 that has to be approved by the Circuit Criminal Court, before his release from Cloverhill Prison.

It is likely to happen in the coming days.