SAO PAULO (Reuters) - A Brazilian court said on Saturday it has authorized the release of Ireland's Kevin James Mallon, a director of international sports hospitality company THG who was arrested on Aug. 5 for the alleged illegal scalping of Olympic tickets.

Mallon was being held along with the former head of the Olympic Council of Ireland (OCI) Patrick Hickey, who is still detained in a Rio prison.

Brazilian police said earlier in August they uncovered emails between Hickey and THG executives discussing tickets they planned to sell at inflated prices, which would earn them as much as 10 million reais ($3.09 million) in profit.

On Friday, a source in the Rio state security services told Reuters that a Rio de Janeiro court will return the passports of three members of the OCI who will be allowed to leave Brazil.

(Reporting by Reese Ewing; Editing by Daniel Flynn)