Former Olympic Council of Ireland (OCI) President Pat Hickey is expected home before Christmas, more than four months after he was held in Brazil and accused of ticket-touting.

The 71-year-old was given his passport back after a judge in Rio de Janeiro accepted €410,000 bail.

The bail bond, a “loan” to Hickey, was paid into court by the Association of National Olympic Committees.

Association President Sheikh Ahmad Al-Fahah Al-Sabah of Kuwait, a friend of Hickey, approved the €410,000 loan with the support of all the association vice presidents in a postal vote.

A statement from the association confirmed it had agreed “on humanitarian grounds” to temporarily loan the bail payment for Hickey to return home for medical treatment for a heart condition.

Sheikh Al-Sabah was among those to speak out in Hickey’s favor at last month’s association general assembly in Doha, Qatar. He referred to Hickey as “our dear VP.”

International Olympic Committee (IOC) President Thomas Bach, who attended the association assembly, touched on the subject in his keynote address.

Bach, a lawyer, said, “We have to say, clearly, that as long as there is no result, our colleague enjoys the presumption of innocence.”

Central to the return of his passport by the court in Brazil is the condition Hickey agrees “to attend all aspects of the ongoing legal process” with regard to the charges of ticket-touting during the Rio Games.

Hickey was arrested on the morning of August 17 at his five-star hotel in Rio by police after they were told by his wife that he had left the country. He was hospitalized after taking ill soon after his arrest, but later released into police custody and then placed under house arrest.

Once he was charged, he stepped aside from his position as president of the OCI, but maintained he was innocent and said he intended clearing his name.

The OCI ruled out any intervention, insisting it was “a personal matter” for Hickey.

In her deliberation when agreeing to Hickey’s passport release, Justice Juliana Leal de Melo noted that he “has no links with Brazil” and that while there was a risk that he may not return to Rio, “this needed to be balanced with health concerns.”

Should he fail to return to Brazil for the trial, which still has no date, the bail bond will be automatically forfeited.

The same court ruled that Kevin Mallon, who is facing similar charges to Hickey, may have his passport returned, upon payment of a bond of €209,261, half of the amount originally required.

Irishman Mallon, a director of THG Sports, a ticketing agency in a group of companies owned by British millionaire Marcus Evans, was also arrested in Rio for alleged illegal sale of Olympic tickets.

Details on arrangements for his return to Ireland from Brazil are unknown.