Petersen was first elected into parliament at the 2007 election, where he was a member of the Socialist People's Party. He was reelected in 2011, but during the term he switched party to the Social Democrats. The switch happened on 21 March 2013. He was reelected as a member of his new party in 2015 and 2019. On 16 August he became the Minister of Higher Education and Science after a minor cabinet shuffle in the Frederiksen Cabinet.[1][2]