Ireland’s largest newspaper group has agreed to a takeover offer from the Belgian media group Mediahuis in a deal in which its largest shareholder, billionaire Denis O’Brien, will lose hundreds of millions on his investment.

Independent News & Media, which publishes Ireland’s biggest-selling daily and Sunday papers – the Irish Independent and Sunday Independent – as well as the Belfast Telegraph and a large number of regional titles, accepted the €145.6m (£125.2m) offer from Mediahuis. INM had €81.7m of cash on its balance sheet at the end of its last financial year, meaning Mediahuis in effect paid €63.9m for the business.

O’Brien, Ireland’s richest man, is the biggest INM shareholder, with a 29.9% stake, and will receive €43.5m from the deal. However, he spent more than €500m buying INM shares to oust the former owner Tony O’Reilly.

Dermot Desmond, INM’s second-biggest investor and the single largest shareholder in Celtic football club, will make €21.8m from the sale of his 15% stake.

The INM chairman, Murdoch MacLennan, who was formerly chief executive of Telegraph Media Group in the UK, said: “We believe [the deal] represents an excellent outcome for both the company and its shareholders. The offer from Mediahuis … fairly reflects the company’s performance and standalone prospects.”

INM reported a 37% decline in pretax profits last year, from €16.4m to €10.3m, as total revenues shrank slightly from €195m to €191m. The company, which has its headquarters in Dublin and employs about 800 people, was formed in 1904 by the then Irish Independent publisher, William Martin Murphy.

MacLennan sought to reassure staff about their future with a non-Irish owner for the first time. “INM has a proud and illustrious history stretching back to the start of the twentieth century, and the INM board believes that this offer from Mediahuis, if approved, will herald an exciting new chapter for our employees, readership and customers,” he said.

“We feel [it] will provide INM with the best opportunity to achieve its strategic objectives, while continuing to enable it to deliver journalism of the highest quality to the island of Ireland and our readers abroad.”

Mediahuis, founded in 2013, has acquired a number of publishers including De Telegraaf in the Netherlands and De Standaard in Belgium, and claims 1.4m daily newspaper sales across the group. The company employs more than 3,200 people and reported a turnover of €819m last year.

Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk

Gert Ysebaert, the Mediahuis chief executive, said: “Mediahuis is optimally positioned to facilitate the continued development of INM as a leading Irish media company. We believe that there is a clear rationale for the acquisition and that INM will thrive under Mediahuis’s ownership.”

In the Republic of Ireland, INM accounts for more than 50% of the daily newspaper market and more than 65% of the Sunday market.

In 2010, INM sold the UK’s Independent and Independent on Sunday to Alexander Lebedev for £1. In 2016, his son Evgeny Lebedev, who also owns the Evening Standard, shut the print editions of the Independent to focus on a digital strategy.