China's parliament named Xi Jinping as president Thursday four months after he took charge of the Communist Party with pledges of reform that have raised hopes but so far yielded little change.
Xi later held phone talks with US President Barack Obama, with the leaders discussing cyber-security, North Korea and greater cooperation on economic and security challenges, according to state media.
About 3,000 delegates lined up to cast their votes in the capital's cavernous Great Hall of the People, dropping red papers into red ballot boxes in front of giant red flags, but the outcome was never in doubt.
Xi received 2,952 votes at the tightly choreographed ceremony, with one against and three abstentions, a 99.86 percent share.
"Now I announce comrade Xi Jinping is selected as president of the People's Republic of China," said Liu Yunshan, who chaired the session at the National People's Congress, a rubber-stamp parliament.
To loud applause, Xi, 59, stood up and bowed to the delegates, before shaking hands with other officials and walking off the stage.
Xi's formal appointment as head of the world's most populous nation is due to be followed by the naming of Li Keqiang as premier on Friday, marking the final step in the nation's once-in-a-decade power handover.
Xi's new role was effectively guaranteed by his position as Communist party leader, the real source of his authority in China, but the title will increase his public and international standing.
And he was soon holding telephone talks with Obama, with the US president calling him within hours to offer his congratulations.
The pair discussed cyber security -- after Obama Wednesday said some threats against US firms were "state sponsored" -- as well as the threat from north Korea's nuclear and missile programmes.
Washington also announced visits to Beijing for US Treasury Secretary Jacob Lew next week followed by Secretary of State John Kerry.
Xi takes office at a time when China is becoming more assertive on the global stage and is taking a harder line on territorial rows with its neighbours, and Xi has vowed to increase its military strength.
Domestically, since taking the top party post in November Xi has pledged to preserve the ruling party's grip on power by cracking down on corruption, improving people's livelihoods and pushing forward economic reforms.
But despite the promises of action on multiple fronts, including pollution, observers say concrete reforms would be complex and will not be swiftly introduced.
Xi last year became head of China's top military body, the Central Military Commission, unlike his predecessor Hu Jintao, who worked as President for two years before his predecessor Jiang Zemin passed on the Commission chairmanship.
As the son of one of China's most famous generals, Xi has closer ties to the People's Liberation Army than Hu did and has strengthened the relationship in recent months with an unusually high number of visits to military bases.
He is seen as one of the architects of China's recent more assertive stance on territorial disputes with neighbouring countries and a supporter of Beijing's military expansion, telling troops recently that they should be "combat ready".
"Comrade Xi Jinping pays a great deal of attention to military development, especially in raising the military's level of battle preparedness," said Yang Jianhua, a green-uniformed military delegate to the NPC.
Tokyo sent congratulations, and its Chief Cabinet Secretary Yoshihide Suga said it had "always kept our door open for dialogue with China", adding the relationship was "one of the most important international relationships for Japan".
Officially Xi was elected for a five-year term, but tradition dictates that barring extraordinary events he will hold the position for a decade.
He is a Communist "princeling", the name given to relations of the first generation of Communist leaders, who grew up immersed in the ruling party's upper echelons.
But he has threatened to target not only lowly "flies" but also top-ranking "tigers" in a crackdown on corruption, which incenses many Chinese, warning that graft could "kill the party".
In the months since Xi's party promotion a parade of lower-level officials have been exposed for graft in efforts that have been lauded in state media as proof of a crackdown.
But an investigation by US news agency Bloomberg found that Xi's family had amassed hundreds of millions of dollars in assets. There was no accusation of wrongdoing on his part.