Estonia has elected a new president, Toomas Hendrik Ilves, who has defeated incumbent Arnold Ruutel.
Mr Ilves won the presidential election by 12 votes
Mr Ilves, 52, received 174 votes from the 345 registered members of the Electoral Assembly, while Mr Ruutel was supported by 162.
A Social Democratic member of the European Parliament, Mr Ilves won popular support after the parliamentary rounds of the election last month.
He will begin his five-year term in office on 9 October.
US President George W Bush is due to visit him in November. It will be the first state visit to Estonia by an incumbent US president.
Mr Ilves has spent most of his life abroad. He was born in Sweden, where his parents had fled after the Soviet Union occupied Estonia in 1940.
He later moved to the US, but in 1993, two years after Estonia regained its independence, he gave up his US citizenship to become Estonia's ambassador to Washington.
Entering politics, Mr Ilves twice held the post of foreign minister, before more recently becoming a member of the European Parliament.
Although the role of president is largely ceremonial, Mr Ilves has vowed to use it to raise Estonia's profile on the international stage - pointing to the perceived success of neighbouring Latvia, which will be hosting the Nato summit in November.