COPENHAGEN (Reuters) - Denmark’s prime minister reshuffled his cabinet on Monday to bring in ministers from two other parties after forming a coalition to broaden his minority government after months of policy battles that threatened to topple the administration.

Denmark's Prime Minister Lars Lokke Rasmussen is seen at the Elysee Palace in Paris, France, November 10, 2016. REUTERS/Jacky Naegelen

Lars Lokke Rasmussen announced deal at the weekend between his Liberals, the Liberal Alliance and the Conservatives to reduces the risk of a snap election, while excluding the populist EU-hostile right-wing Danish People’s Party.

Since last year’s election, Rasmussen’s Liberal Party, which holds just 34 of 179 seats in parliament, has ruled alone. It has relied on its allies, including the DPP, or occasionally the opposition, for support to pass votes.

Bringing the Liberal Alliance and Conservatives into government and rewarding them with ministry posts cements them into a tighter group, reducing the threat of public dissent.

The new foreign minister will be Liberal Alliance leader Anders Samuelsen, who in recent months had threatened to bring down the government because of disagreements over tax cuts, immigration and welfare policies.

“Yes, this has been an ugly course, but that is how politics is. And we are very pleased with the prime minister’s invitation to join his government,” Samuelsen said.

The finance minister will be Kristian Jensen of the Liberals, who was previously foreign minister.

The Liberal Alliance, which has 13 seats in parliament, got six ministries. Rasmussen’s Liberals will lead 13 ministries. The Conservatives, with six seats, have three ministries

“I expect that the three of us collaborating will create a much more accommodating environment in parliament and the government is much closer to the 90 seats than we were two days ago,” Rasmussen said after he presented his government to Queen Margrethe.

Rasmussen said at a news conference on Sunday that his new government would seek to increase defense spending and ease the tax burden on home-owners and the wealthy.

With 53 seats, the coalition will still need support from the Danish People’s Party’s 37 seats, which will constrain its freedom of maneuver. But the DPP has shown no signs of withdrawing its backing, since an election would likely hand power back to the opposition.

The next election is due no later than June 2019.

Samuelsen will be joined in government by his sister Mette Bock, who becomes culture minister, bringing the total number of female ministers to nine out 22. It is the first time in 50 years siblings have been in government.