After a lengthy career in local politics, Gentiloni was elected to the Chamber of Deputies in 2001. He served in the Cabinet under Romano Prodi as Minister of Communications from 2006 to 2008. In 2007, he was one of the senior founding members of the Democratic Party, and went on to become Party President from 2019 to 2020. Gentiloni later served as Minister of Foreign Affairs from 2014 to 2016 under in the Cabinet of Matteo Renzi. Following Renzi's resignation in the wake of a failed constitutional referendum, the Democratic Party held discussions on his replacement. Eventually, Gentiloni won support from his colleagues, and President Sergio Mattarella appointed him Prime Minister on 12 December 2016.