Irish businessman Richard O'Halloran has left China, the Chinese Embassy in Ireland said on Friday afternoon.
Earlier, The Irish Times learned that a deal had been agreed to bring Mr O’Halloran back to Ireland.
Mr O’Halloran, who works in aircraft leasing, had been prevented from leaving China for almost three years following a commercial dispute between his employer and the authorities there.
The Chinese Embassy in Dublin tweeted the remarks of a spokesman on Friday afternoon.
"The related court in Shanghai handles Mr Richard O'Halloran's case according to law, and the exit ban on him has already been lifted.
“We noticed that Mr Richard O’Halloran has left China. It is expected that he continues to fulfill his pledges and commitment and undertake his corresponding legal obligations.”
It is understood the deal was brokered between the Department of Foreign Affairs and Chinese authorities, and also between Mr O’Halloran and his company.
Mr O’Halloran is expected to return to Ireland some time on Saturday, it is understood.
Sources said the negotiation had been "torturous" and involved several false starts. The deal had been worked on at the highest levels of the Department of Foreign Affairs, with Minster for Foreign Affairs Simon Coveney personally involved.
The last few days and nights have seen a frenzy of intense activity to finalise the deal.
The 46-year-old father of four had been prevented from leaving China since February 2019 over a legal dispute involving a Dublin-based aircraft leasing firm that he worked for.
The businessman was caught up in the dispute between the Chinese authority and Min Jiedong, the chairman and main shareholder of the Dublin firm China International Aviation Leasing Service, where he is a director.
The dispute centred on Min's raising of funds from Chinese investors in a crowdfunding scheme to buy an Airbus aircraft. This predated Mr O'Halloran's employment with the company.
The aircraft has been leased on a long-term arrangement with a Finnish airline.
Mr O’Halloran attempted to leave China in February 2019 after testifying against Min but was stopped by Chinese police and told that an exit ban was placed on his passport.
The Dubliner was not suspected of any wrongdoing nor was he charged with any crime, but his exit was blocked as the Chinese authorities sought the return of investors’ money in full.
At one point, Shanghai police demanded $36 million (€30 million).
The Dublin company was not in a position to repay the money in full but under an agreement drafted by Irish businessman Ulick McEvaddy, who became a director of the company to try to secure Mr O’Halloran’s release, monthly repayments have been made to the Chinese authorities from the lease income on the aircraft.
More than $100,000 (€90,000) per month is being paid under that agreement.
Mr O’Halloran’s family have repeatedly spoken of the mental and physical toll on the businessman due to his detention in China.
They are not expected to make a public statement about his release until after he lands back in Dublin.
His family are said to be “delighted” that he has been allowed to leave China and with Mr Coveney’s statement on his release, and are looking forward to his return home.
While Mr O’Halloran had been prevented from leaving, he had been permitted to live freely in the country.
Mr Coveney travelled to China last year to meet his Chinese counterpart Wang Yi where he asked for Mr O'Halloran to be released.
Department of Foreign Affairs officials have been working on his case in the background over recent years.
President Michael D Higgins, Irish TDs and European MEPs are among those who have lobbied extensively for Mr O'Halloran's release.