The Hungarian parliament has elected Janos Ader as president after his predecessor, Pal Schmitt, resigned last month in a plagiarism scandal.
A Euro MP and lawyer, Mr Ader, 52, is also a founder member of Prime Minister Viktor Orban's ruling Fidesz party.
Since coming to office, Mr Orban has been accused of using his large majority to cement his power.
The opposition Socialists boycotted Wednesday's vote, saying Mr Ader would add to the party's dominance.
The far-right Jobbik party voted against him.
'Friendship and respect'
Pal Schmitt, a former Olympic fencing champion, resigned from the presidency a month ago after Semmelweis University in Budapest stripped him of his 1992 doctorate when it found that much of it had been copied.
Although Mr Ader's role is largely ceremonial, he was instrumental in drafting controversial changes to Hungary's judiciary which prompted the European Commission to refer the Budapest government to the European Court of Justice.
The Commission has also accused Mr Orban's government of limiting media freedom and undermining the independence of the central bank.
In his inaugural speech, the new president promised to "avail himself fully of both his constitutional rights and obligations".
The BBC's Nick Thorpe, who's in Budapest, says that sources close to the new president say his implication was that laws proposed by the governing party would come under much closer scrutiny than in the past, and that he was fully prepared to return them to parliament, if he found fault with them.
Mr Ader also had a strong message for the international community: "I say to the people of the neighbouring countries, and to our allies in the European Union and Nato, we offer them friendship and respect - which also means that we expect the same respect and friendship back."
Mr Ader will formally take office on 10 May as Hungary's fifth democratically-elected president since the fall of Communism in 1989. However, he is due to represent Hungary at the weekend for a Visegrad group meeting in Slovakia which also involves Poland and the Czech Republic.