The man behind Vietnam's successful handling of the coronavirus pandemic, Nguyen Xuan Phuc, was formally sworn in as president in Hanoi on Monday.

Phuc, 66, was Vietnam's prime minister for the last five years, a period in which the economy boomed, and his government's Covid-19 response won plaudits at home and abroad.

Following secret voting on Monday, Phuc scored the maximum votes among the almost 500-member rubber-stamp national assembly.

"This is his well-deserved award," said Nguyen Khac Giang, a Vietnamese politics expert from New Zealand's Victoria University of Wellington.

Authoritarian Vietnam is run by the Communist Party and officially led by the party general secretary, president, and prime minister, with key decisions made by the 18-member politburo.

Vietnam is in the midst of its twice-a-decade leadership transition, with 76-year-old Nguyen Phu Trong re-elected in January as party general secretary, the most important of the three roles.

Pham Minh Chinh, 62, a former deputy minister of public security who is known for the reforms he carried out while party chief of northern Quang Ninh province, was sworn in as prime minister Monday.

Phuc was the only candidate nominated for president, as Trong -- who had held the presidency since 2018 after the sudden death of his predecessor -- stepped down.

Nguyen Xuan Phuc has been sworn in as Vietnam's new president
Nguyen Xuan Phuc has been sworn in as Vietnam's new president Vietnam News Agency / STR

The National Assembly said earlier this was "the first time ever a prime minister was nominated to the position of the president".

After his swearing in, Phuc told the nation he was "lucky and honoured" to be given the position, which is now only second to Trong in the power escalator.

Politburo leaders are usually expected to retire at 65, but Vietnam has bent the age rules for both of them.

Although the presidency is largely a ceremonial role, "Mr Phuc will now be the second-ranked member in the party which makes a strong case for him to claim the general secretary post if Mr Trong has to step down earlier than expected," Giang told AFP.

Rumours have swirled in recent years about Trong's health after he took a month-long absence in 2019.

According to Giang, Phuc's experience of "well managing Vietnam's relationship with the US under the turbulent administration of Donald Trump" will stand him in good stead for his foreign affairs responsibilities as president.

New Prime Minister Chinh said the role was an "honour" but also a "heavy responsibility".

The government will continue to be "persistent in fighting corruption and wastefulness" and is "determined to strongly protect territorial integrity and sovereignty," he added.