The longest-serving prime minister of the Netherlands, Ruud Lubbers, who has died aged 78, enjoyed a protracted political career, not only at home but also with the United Nations and in the European Union, where his work may well come to be seen as his most important and enduring legacy.

The Netherlands assumed the rotating, six-month presidency of the European Community, as it was at the time, in the second half of 1991. As an otherwise unspectacular term was drawing to a close, a summit conference at the southern Dutch city of Maastricht produced a crucial treaty, paving the way for the European Union and a common currency, the euro.

As usual, the leaders of Germany (Helmut Kohl) and France (François Mitterrand) were the key players. But Lubbers was the honest broker, working hard in the background to facilitate agreement on radical proposals which even a sceptical British prime minister, John Major, could accept.

Rudolphus Franciscus Marie Lubbers was born in Rotterdam, the son of Paulus, a wealthy engineering contractor, and his wife, Wilhelmine (nee Van Laack). He attended a Jesuit boarding school and then studied economics at the city’s Erasmus University before going into the family business, of which he became a director on his father’s death in 1965.

Lubbers was active in employers’ associations and in Roman Catholic party politics from early in his business career – and was only 34 when he was appointed minister of economics in the coalition government led by the new Christian Democratic Appeal (CDA), formed from two protestant parties and the Catholic People’s party.

Four years later he was appointed business manager (chief whip) of the parliamentary CDA, a post in which he deployed his skills in negotiation and compromise, much needed for success in Dutch politics where a “pure” proportional representation system makes complex and fragile coalitions unavoidable.

The CDA secured another term in power following the 1982 general election. The prime minister, Dries van Agt, resigned soon afterwards and Lubbers took his place. The country was in economic trouble with an apparently uncontrollable budget deficit, high unemployment and a huge and ever-expanding welfare bill. “Holland is sick,” Lubbers said.

His attitude to this enervating crisis was similar to that of Ronald Reagan and Margaret Thatcher: “More markets, less government” became a familiar slogan. He set about persuading industry to create more jobs and the unions to moderate wage demands and accept quite severe cuts in welfare, including unemployment benefits and disability payments, both of which were commonly seen, not only by the government, as widely abused and unsustainable.

Despite strikes and protests, Lubbers proved to be accomplished at crafting policies in such a way that people and groups with strongly differing views came to accept them. Public spending was slashed. He was prepared to negotiate at great length to achieve a compromise solution, to such a degree that some critics said he had no principles, while supporters said he was a pragmatist.

In 1984 he fended off Nato pressure to accept the positioning of medium-range nuclear missiles on Dutch soil, a proposal that aroused strong and widespread public protests, just as it had done in neighbouring West Germany the previous year. In the end, Lubbers provisionally agreed to accept them – after a delay and under strict conditions – but the plan was abandoned and the controversy fell away when the US and USSR started strategic arms reduction talks.

On standing down as prime minister after 12 years in 1994, he was generally expected to succeed Jacques Delors as president of the European commission but was pipped at the post by Jacques Santer. Two years later he was disappointed again when he failed to become secretary general of Nato: the job went to Javier Solana of Spain.

Lubbers took on part-time lecturing in economics at Tilburg university in the Netherlands and at Harvard, until in 2001 he was appointed UN high commissioner for refugees. He set about reorganising the agency’s overstaffed management and stabilising its finances, with such success that the US government, the principal donor, said the UNHCR was the best run UN agency. Lubbers, wealthy in his own right, returned his salary to the UN and worked without pay.

In 2003 he was accused of the sexual harassment of a female employee. The UN secretary general, Kofi Annan, at first supported Lubbers – but an internal inquiry found a pattern of alleged sexual misconduct and Annan asked him to resign.

He came out of retirement in 2016, on the eve of the British referendum on EU membership, pleading in a German newspaper interview for Britain to vote to remain. He was, of course, disappointed.

He is survived by his wife, Ria (nee Hoogeweegen), whom he married in 1962, and their daughter, Heleen, and two sons, Paul and Bart.

• Rudolphus Franciscus Marie Lubbers, politician and statesman, born 7 May 1939; died 14 February 2018