His absence from the European Council eases significant pressure on countries more reluctant to advocate a two-state solution.
Pedro Sanchez leaves office after the right's victory in the Spanish legislative elections of November 29.
Pedro Sanchez's resignation also deprives the Union of one of its last social-democratic strongholds.
The Party of European Socialists thus records its weakest representation on the European Council in its history.
In recent months, Pedro Sanchez had found himself isolated within the European Union. He defended a liberal position on borders and regarded immigration as an economic asset.
The People's Party defended a stricter line, in step with the majority of European leaders.
Frederiksen, however, defends a line radically different from that of Pedro Sanchez on immigration.
Pedro Sanchez's departure will also have repercussions for Europe's relations with Israel.
Since the start of the Israeli invasion of Gaza, his government had maintained a clear position against the actions of the IDF.