The Olympic Council of Ireland has said it will fully co-operate with an expected Irish state inquiry into the alleged illegal sale of tickets for the Rio games.

Two ticket agencies at the centre of the controversy have also pledged their co-operation and urged the anticipated probe in Dublin to make its findings as quickly as possible.

Ireland's Sports Minister Shane Ross is expected to appoint a judge or barrister to head an independent inquiry after flying back early from Brazil to meet the attorney general.

READ MORE: Irish Olympic chief Patrick Hickey steps aside amid ticket sales probe

The head of the Olympic Council of Ireland (OCI) Patrick Hickey has been discharged from hospital in Rio and taken to a police station for questioning in connection with the investigation.

He was detained at a hotel in the Barra da Tijuca area of the city and later taken to hospital with chest pain before he underwent cardiac tests.

Mr Hickey, 71, who stood down from his role following his arrest, was monitored at nearby Samaritano Hospital until around 4pm local time on Thursday.

READ MORE: Irish Olympic chief Patrick Hickey steps aside amid ticket sales probe

The OCI said: "The Olympic Council of Ireland confirms that it will co-operate fully with any state inquiry into its handling of ticketing arrangements for the Rio Olympics.

"The OCI will now also commission its own independent inquiry into the ticketing arrangements for Rio 2016. The previously announced internal inquiry by the OCI has been discontinued."

Mr Hickey has been formally accused under Brazilian law of ticket touting, running a cartel and illicit marketing.

READ MORE: Irish Olympic chief Patrick Hickey steps aside amid ticket sales probe

This is a stage in the legal process that is not equivalent to being charged in British or Irish law but is a preliminary step in that direction. He has denied any wrongdoing.

After his arrest Mr Hickey, from Dublin, stepped aside from his positions as the International Olympic Committee member in Ireland, president of the European Olympic Committees and vice president of the Association of National Olympic Committees.

The investigation centres on the sale of more than 800 tickets to the Games, including more than 20 which police said were intended for use by Ireland's Olympic officials.

Irishman Kevin Mallon, a director of THG Sports, which specialises in corporate and sports hospitality and is owned by Ipswich Town FC owner Marcus Evans, has been in custody in Brazil since August 5 over the affair.

READ MORE: Irish Olympic chief Patrick Hickey steps aside amid ticket sales probe

Mr Mallon was arrested after police seized Olympic tickets in a Rio hotel, some of which were part of the Irish allocation and some for the opening and closing ceremonies and the football final.

The authorised ticket reseller (ATR) contracted by the OCI is Dublin-based PRO10 Sports Management.

The company said it had legitimate customers for its tickets and Mr Mallon was acting as a collection agent for them in Rio, meeting clients.

THG and PRO10 have denied any wrongdoing over ticket sales.

In a statement on Friday, THG said it wants an independent inquiry in Ireland to "be actioned expeditiously" and pledged its full co-operation "in the strong belief that it can demonstrate that the company has acted lawfully at all times".

"While THG respects the Brazilian police process, which clearly is different to that in the UK or Ireland, THG believes that a full and proper judicial assessment cannot be achieved without consideration of, and access to, all the THG compliance documentation which THG has followed in the provision of hospitality packages in Rio," the company said.

READ MORE: Irish Olympic chief Patrick Hickey steps aside amid ticket sales probe

PRO10 also called for an inquiry to "be established speedily" and "report its conclusions in the shortest possible time".

"We have nothing to hide and are therefore anxious that the full facts are established and made public as soon as possible so that our good name can be exonerated," the firm said.