He was born on May 7, 1964, in Sopron. He is married; his wife is a college professor, and they have two sons. In 1982, he graduated from high school in Sopron. After graduation, he was admitted to the Faculty of Humanities at Eötvös Loránd University (ELTE), majoring in history and Latin. During his university years, he was a member of the Eötvös College. In 1987, he studied at the University of Heidelberg. He received his degree from ELTE in 1988 and then started working at the Department of Medieval and Early Modern Hungarian History at the university. From 1988, he was a scholarship holder of the Hungarian Academy of Sciences (MTA), from 1990 an assistant lecturer, from 1994 an assistant professor, and since 2001 an associate professor. In 1990, he earned his doctoral degree, and in 1996 he obtained a PhD.
In 1999, he was voted "Instructor of the Year" by the students. Since 1992, numerous professional studies of his have been published, nearly twenty of which also appeared in German, Dutch, French, and English.
In October 1989, he was one of the founders of the downtown organization of the Hungarian Socialist Party (MSZP). From 1996, he was a member, and from 1998, vice-chair of the MSZP National Board. From May 2000, he was a member of the National Presidency. From spring 2003, he was vice-president of MSZP, and between 2004 and 2007, he served as the party's president.
He won an individual parliamentary seat five times. On April 7, 2002, in the first round of the elections, he entered the National Assembly from Pesterzsébet-Soroksár. Between 2002 and 2003, he was the political state secretary of the Ministry of Education. From 2003 to 2005, he served as Minister of National Cultural Heritage.
In the 2006 parliamentary elections, he won an individual mandate again in constituency no. 29 of Budapest. Between 2006 and 2010, he was Minister of Education and Culture. From 2010 to 2014, he became a Member of Parliament from the national list of MSZP. In 2014, he won an individual mandate in the Pesterzsébet-Kispest constituency.
From May 6, 2014, to May 1, 2022, he was Deputy Speaker of the National Assembly.
On April 8, 2018, he once again won an individual mandate in Budapest’s 16th constituency (Pesterzsébet-Kispest). In 2022, he again won an individual mandate in Budapest’s 16th constituency (Pesterzsébet-Kispest).
In March 2025, he received the Miklós Radnóti Anti-Racism Award.