A court victory for the ATO means a big tax bill for tycoon Lex Greensill.

Mr Greensill helped grow Greensill Capital into an international giant, but was unable to stop the enterprise going into administration in March.

The Peter Greensill Family Trust sold shares in the company between 2015 and 2017 and paid 100 per cent of the gains — $58 million – to founder Lex Greensill. At the time, he was living in London and classed as a foreign resident.

Given that the trust is in Australia, the Australian Taxation Office claimed tax should be paid on it.

The Trust took the ATO to court and lost, then appealed that decision and has now lost again. He must now pay the $58 million bill, as well as the ATO’s legal costs.

“The Court's judgment clarifies issues around capital gains assessed to the trustee of a resident trust, where the trustee makes a non-resident beneficiary entitled to these gains,” an ATO spokesperson said in a statement.

“The ATO cannot comment further on the tax affairs of any individual or entity due to our obligations of confidentiality under the law.”