The 2002 election campaign was divisive and close. Former prime minister Viktor Orbán, seen as young, charismatic, and ambitious, if not arrogant, debated Medgyessy, who was regarded as a soft-spoken pragmatist. "I think the Hungarian population has long wanted a calmer, quieter style of politics," he said regarding his differences with Orbán. Because the Socialists and Liberals control only a slim majority of seats in parliament, Medgyessy has had to prove himself an able and strong leader. During the election campaign, he called for transparency in the budget and pay raises for health workers and teachers. He stated his wish for improving relations with neighboring countries, including Slovakia and the Czech Republic, which Orbán had alienated with extreme nationalist statements. Under Orbán, Parliament passed a law entitling Hungarians living in Romania, Slovakia, Ukraine, Serbia, Croatia, and Slovenia to a special identity document allowing them to temporarily work, study, and claim health care in Hungary. While Medgyessy recognized the importance of a thriving Hungarian culture, he highlighted the values of diversity, fairness, and social justice during the campaign.
Medgyessy was confronted with scandal a month after taking office. In June 2002, allegations surfaced that he had worked as a counterintelligence agent in the secret service under the Communist regime in the late 1970s and 1980s. Medgyessy claimed he never collaborated with Moscow's KGB, but instead sought out Soviet spies attempting to sabotage Hungary's attempts to join the IMF. After he admitted his role, his popularity soared.