He was elected prime minister in 2007 and with his party's victory in the 2011 Polish parliamentary election, he became the first Prime Minister to be re-elected since the fall of communism in Poland. In 2014, he became president of the European Council and was re-elected to this position in 2017. He resigned as Polish prime minister to take the role, having been the longest-serving Prime Minister of the Third Polish Republic and the third longest-serving Prime Minister of Poland after Józef Cyrankiewicz and Piotr Jaroszewicz.