One of Ireland's richest men, billionaire telecoms and media tycoon Denis O'Brien, has avoided a tax 57 million euro (£47m) tax bill over a lucrative share trade.
A long-runnning legal battle has ended with a judge ruling that the businessman was living in Portugal when he sold a multi-million holding in the phone company Esat Digifone in 2000.
The High Court in Dublin found that Mr O'Brien's home was in the Algarve not Ireland, and upholds a decision not to hit him with the tax bill.
The inspector of taxes in the Irish Republic, John Quigley, had challenged the original ruling in a bid to force an invoice for capital gains tax.
The bill had been disputed after Mr O'Brien bought a mansion in one of the most exclusive parts of Dublin, Raglan Road, Ballsbridge, in February 2000, around the time he sold the shares.
The deal saw the media mogul sell a 5.7 million holding in Esat to BT for 285m euro (£235m) and the tax man believed it should have netted 57m euro for the Irish state.
Mr O'Brien was not in court and later declined to comment on the ruling.
The allegation was that a company called Parteney Limited, which was controlled by Mr O'Brien, had bought Raglan Road - a seven bedroom, detached house - in 2000 and that made him liable for the tax bill.
Judge Mary Laffoy, who heard the case, said the company was a separate and distinct legal entity from Mr O'Brien.
She ruled that the Dublin mansion was not a permanent home at the time of the share sale.
"At the risk of unnecessary repetition, the respondent has failed to recognise that the 'permanent home available' test involves two conditions, in addition to the 'available' for use condition, namely, that the place of abode should be permanent and that it should meet the concept of a 'home'," the judge said.
The O'Briens have argued that the Dublin mansion was uninhabitable when it was bought, a claim disputed by the people they bought it from, Peter and Letitia White.
Mr O'Brien moved to his house in Quinta de Lago, Almanscil, Portugal, in February 2000 after it had been built two years earlier and did not move into Raglan Road until 2003.
Judge Laffoy also noted that the Appeal Commissioner, who originally ruled in favour of Mr O'Brien, found that he was tax resident in Portugal for the 2000/2001 and that the Portuguese authorities have always accepted his residence status.
The judge noted that the Appeal Commissioner stated in the case that the standard of proof which he had applied was "on the balance of probabilities".
Mr O'Brien founded the Communicorp Group which has radio stations in five countries and he also owns mobile phone company Digicel, one of the dominant players in the Caribbean market.
The billionaire, who made his first fortune in the telecoms business in Ireland, was found by a state tribunal in Ireland to have secured a mobile phone licence in the mid-1990s after getting information from the then Communications Minister Michael Lowry.
Mr O'Brien has vehemently denied the finding and fought for years against the inquiry.