COPENHAGEN — King Frederik of Denmark asked Troels Lund Poulsen to try to form a new government, the palace announced after weeks of inconclusive coalition talks in Copenhagen. The king's statement requested that Poulsen lead negotiations to form a government without the participation of the Social Democrats and the moderates.

The request followed the failure of Mette Frederiksen to assemble a ruling coalition after the March parliamentary elections, in which no party won a majority of seats. The Social Democrats won a plurality of the vote, though the result was the party's worst electoral showing since 1903.

Frederiksen had attempted to form a left-leaning government with the support of Lars Løkke Rasmussen's centre-right moderates. On Friday night, Rasmussen walked out of those negotiations and backed Poulsen, who chairs the centre-right liberal party.

After meeting with the king on Friday afternoon, Frederiksen indicated there was a possibility of a rightwing coalition governing Denmark. The current attempt to build a government is the longest in Danish history.

Poulsen will have to marshal a coalition of rightwing parties to form a government. Several rightwing parties gained seats in the March elections, with the Danish People's Party tripling its vote share from the previous election to reach 9.1%.

The king's statement indicated that the Danish People's Party had pushed for Poulsen under the condition that the new government have an explicit goal of introducing measures that will lead to a Muslim net exodus from Denmark. The Danish People's Party was among the rightwing parties that gained seats in the March elections.

Left-leaning parties in Denmark have adopted stricter immigration control policies in recent years. The Social Democrats, who won the plurality of votes in March, had led the previous government before Frederiksen's coalition talks collapsed.