An indirect presidential election was held in Hungary on 13 March 2017. Incumbent President János Áder was re-elected with an absolute majority for a second term.

Background Following the outbreak of a controversy surrounding his 1992 doctoral dissertation, President Pál Schmitt announced his resignation to the National Assembly on 2 April 2012. Fidesz politician and incumbent MEP János Áder was elected on 2 May to a five-year term by a vote of 262–40,Kuli, Alex. "Hungary Elects Orban Ally as New President." Associated Press. 2 May 2012. and assumed office on 10 May 2012."Hungary: Janos Ader Replaces Pal Schmitt as President." BBC.co.uk. 2 May 2012. Accessed 2012-05-04.

Since 2012, several journalists and political scientists had assumed that Viktor Orbán intended to move from his position as Prime minister to become head of state at the next presidential election. As Népszabadság author Ildikó Csuhaj quoted an anonymous source in her article dated 21 May 2014, the "role of head of state, representation of a united nation is not just a momentary desire, but a realistically thought out option", and "this is a dilemma for the Prime Minister for the time being". Csuhaj argued that the governing coalition were considering the adoption of a French-type semi-presidential system, as the government had a supermajority in the National Assembly, and in this event János Lázár would have succeeded Orbán as prime minister, according to reports from Figyelő. In an interview with Handelsblatt in October 2012, Orbán said that "a presidential system is probably more appropriate to implement difficult reforms than a parliamentary system". Following the resignation of Schmitt in April 2012, Orbán told a conference at the Supreme Court that "there were numerous arguments for a presidential system" during the constitutional process in 2011, but in the event they did not adopt that "for historical and law-abiding reasons".

In early 2015, however, Fidesz lost its two-thirds majority following the 2014 Hungarian Internet tax protests and a subsequent decrease in support for the government. The governing party suffered defeats at two parliamentary by-elections in February and April 2015, both in Veszprém County; thus it was unable to amend the constitution unilaterally after that. Before the by-election in February 2015, János T. Juhász, editor of the left-wing newspaper Népszava, wrote that the main significance of the by-election was to prevent Orbán becoming President of Hungary "with absolute power for nine years". In May 2015, Orbán said to Hír TV, "the probability is less than zero" that he would become President after 2017. That position "requires a different political character, who represents the unity of the nation". On 13 December 2015, the 26th congress of the ruling Fidesz party re-elected Viktor Orbán as party leader. He said in his speech that he was ready to lead the party into the forthcoming parliamentary election and to continue to serve as prime minister if Fidesz wins re-election in 2018. With that statement, Orbán made it clear that he does not intend to become president, succeeding Áder during the 2017 indirect presidential election.

Electoral system Under the current Constitution of Hungary adopted by the Fidesz–KDNP government coalition in 2011, the President must be elected in a secret ballot, no sooner than sixty but no later than thirty days before expiry of the mandate of the previous office-holder, or if his or her mandate terminated prematurely, within thirty days of the termination. The constitution authorizes the Speaker of the National Assembly to set the date for the election.

A presidential candidate needs the written nomination of at least one-fifth of the Members of Parliament (thus 40 MPs), who may not nominate more than one candidate. In the first round of the election, a two-thirds majority of all incumbent MPs is required to elect the president. If this condition is not fulfilled, a second round is held between the two candidates who received the highest and second highest numbers of votes in the first round. (Since 1990, there have been no more than two candidates in any presidential election.) A simple majority of the voting MPs is then sufficient.

Candidates Fidesz–KDNP In contrast to Schmitt, who during his presidency of almost two years did not send any bill which had been voted on by the National Assembly back for consideration by the legislature, nor submit any to the Constitutional Court for judicial review, János Áder proved to be a counterweight to the Orbán government on a number of important issues. For instance, he sent the proposed voter-registration plan to the Constitutional Court for preliminary legal review in December 2012. A month later the court ruled that the law curtailed voting rights to an unjustifiable degree, because the requirement for voters to register before going to the polls applied to every voter. Following that, the cabinet withdrew the election procedures bill. In May 2015, Áder refused to sign the new land law which was intended to pass the right of management of national parks to the National Land Fund Managing Organization. Áder also used his veto power in March 2016 on the controversial bill which would have declared public funds allocated to the foundations of the Hungarian National Bank as "private funds".

By contrast, Áder signed the controversial fourth amendment of the constitution. "It is my unequivocal constitutional duty to sign and declare this constitutional amendment as law. This is regardless of whose tastes the changes meet and regardless of whether I like it or not", he defended his position. Left-wing liberal journalist Gábor Miklósi (Index.hu) summarized Áder's presidency with the argument that the president remained silent on the really important matters and "his rare criticism does not hinder but legitimizes Hungary's increasingly authoritarian political system".

Despite Miklósi's remarks, the above disagreements, primarily the rejection of electoral registration and the reclassification of MNB public funds, were serious political setbacks for Prime Minister Viktor Orbán, who, as a result, seriously considered the replacement of Ádár by a more obedient candidate in the 2017 presidential election. Pro-government portal Origo.hu, citing anonymous sources from the Fidesz leadership, wrote in April 2016 (a month after Áder refused to countersign the MNB law) that Áder's dismissal after the expiry of his mandate in May 2017 was "almost certain". The website noted that Orbán personally opposed Áder's nomination, and wanted a non-politician in his place, for instance academics József Pálinkás or Szilveszter E. Vizi. In May 2016, Hír TV's microphone recorded a short conversation between György Rubovszky, Chairman of the Justice Committee, and Imre Vas, the committee's deputy chairman. Rubovszky told his colleague that there was no way to re-elect Áder in 2017 as "Viktor [Orbán] does not allow it".

On 8 December 2016, the opposition ATV claimed that Calvinist pastor and Minister of Human Resources Zoltán Balog had been selected by Orbán and the party leadership as successor to Áder as President of Hungary. The news portal added that the passive attitude of Áder during the October 2016 migrant quota referendum campaign was also harmful for the "relationship of trust" between him and Orbán. ATV also referred to the government's dilemma: was it appropriate to elect a Calvinist President (Balog), with the incumbent prime minister (Viktor Orbán) and House Speaker (László Kövér) also belonging to that ecclesiastical community, despite Hungary's Catholic majority? Balog refused to comment on press reports. In contrast to ATV, Fidesz-backed Origo.hu reported three days later that Áder would remain as President despite such "serious candidates" as Balog and Barnabás Lenkovics, a former President of the Constitutional Court. The news portal added that re-election was a decision only for Áder, who had asked for time to consider his candidature. After a long conservation with Kövér, Áder telephoned Orbán to say that for his part, he was willing to undertake a second presidential term, ATV wrote. On 21 December, ATV reported that Orbán had requested from the party leadership the official nomination of János Áder as President, during an external meeting in Dobogókő. The party presidency accepted the nomination, the source said. Pro-government daily Magyar Idők confirmed ATV's information the next day: it wrote that "there is a consensus within the Fidesz party presidency to nominate Áder as their candidate for the post of President of Hungary". Parliamentary group leader Lajos Kósa officially announced Áder's nomination on the same day. On 29 December, Áder announced that he would accept the nomination, calling his presidential role a "constitutional service".

Index.hu journalist Szabolcs Dull quoted views and opinions from the ruling party, which told, in addition to Balog's Calvinist religion, which indeed appeared to be a strong argument against his nomination in the eyes of the Prime Minister, who sought good relations with the Catholic Church in Hungary; removing Balog from his current position as Minister of Human Resources would have caused major problems in the super ministry and the entire government structure, in contrast to an expected political benefit if Fidesz elected Balog president. Dull argued that Áder had in the event not caused "big trouble" during his first term, and so his re-election "did not represent a significant political risk" to Orbán. On 5 January 2017, left-wing liberal portal 444.hu reported that several members of the Fidesz presidency, primarily László Kövér and Gergely Gulyás, had succeeded in convincing Orbán at the Dobogókő meeting to choose Áder rather than Balog.

Left-wing opposition Affiliation Members 114 17 Government 131 28 24 5 4 2 1 1 Opposition 65   Independent 3 Total 199

Among the parliamentary groups, only Fidesz had more than 40 MPs which was a requirement to nominate a presidential candidate. Since the autumn of 2016, Sándor Székely, the president of the Hungarian Solidarity Movement and also a member of the General Assembly of Budapest, had decided to look into the possibility of proposing an acceptable candidate whom all "democratic parliamentary parties" (i.e. excluding the far-right Jobbik party) could support. According to Székely, Balázs Gulyás (a leading figure of the 2014 Internet tax protests), literary historian Péter Krasztev and Székely himself started to look for a suitable nominee. Eventually they launched a petition to support the nomination of legal scholar and academic László Majtényi. Majtényi had served as Parliamentary Commissioner for Privacy and President of the National Radio and Television Commission (2008–09), and held the position of Director of the Eötvös Károly Institute NGO during the candidature. Thirty-nine intellectuals and well-known public figures had signed the petition by 2 January 2017, including László Z. Bitó, János Bródy, Kinga Göncz, Ágnes Heller and Lajos Parti Nagy. They believed Áder was loyal to his party rather than to the constitutional system, and that Majtényi would effectively provide checks and balances to the Orbán cabinet. On 4 January, Majtényi announced that he accepted the intellectuals' nomination and published the four points of his presidential programme: a call for constitutional referendum; a free and fair electoral system; a fight against poverty; and a fight against corruption.