Janos Ader was on Monday re-elected for a second five-year term as President of Hungary by the country's parliament during a secret vote.
He received support from 131 of the 199 lawmakers, having only been backed by the governing conservative Fidesz party.
He was re-elected during the second round of voting, as the first was deemed inconclusive when he did not receive support from at least two-thirds of Parliament.
The other candidate, Laszlo Majtenyi, received 39 votes from the center-left opposition, while the nationalist Jobbik party refused to participate in the vote.
In a speech to Parliament, Ader said that the concern for future generations had a prominent place in his first term and thanked lawmakers for approving the Paris accords on climate change.
He also highlighted the importance of presenting and defending Hungarian interests abroad.
Meanwhile, Majtenyi drew attention to poverty and corruption in the country and accused Prime Minister Viktor Orban, also of the Fidesz party, of acting selfishly.
The Hungarian president has few obligations and it is a primarily representative role, though among the powers are the issuing of laws.
Ader, who is close to Orban, is the fifth president since the fall of the Communist regime in 1989.