MADRID — Spain’s king has reminded the country’s political leaders they need to accept compromises in order to end nine months without a government.

King Felipe VI issued a statement Monday that recalled a speech he made after an inconclusive general election last December, when he urged parties to negotiate agreements on who should take power.

But Spain has never had a coalition government, and party leaders remain reluctant to give ground despite a second inconclusive election last June and possibly a third one before the end of the year.

Acting Prime Minister Mariano Rajoy, whose conservative Popular Party got most votes in both elections, said Monday that he would continue trying to persuade the second-place Socialists that they have enough in common to make them potential allies.