Vietnam's National Assembly on Thursday elected Vo Van Thuong as the country's new president.
The country is changing its top leadership as it continues its anti-corruption campaign.
In an extraordinary session, lawmakers confirmed the 52-year-old Thuong as president after the ruling Communist Party nominated him on Wednesday.
The president in Vietnam is largely a ceremonial job.
But it is one of the nation's top four political positions.
Thuong's election follows the sudden resignation of previous president Nguyen Xuan Phuc.
Phuc stepped down in January.
The party blamed him for "violations and wrongdoing" by officials under his control.
His resignation was seen as a major escalation of the country's anti-corruption crackdown.
In his first speech to the parliament as new president, Thuong said he will "resolutely" continue the fight against corruption.
"I will be ... loyal to the fatherland, the people and the constitution, striving to fulfill the tasks assigned by the party, the state and the people," Thuong said in a statement on Vietnam's state television.
Thuong is the youngest member of the party's Politburo, the country's top decision-making body.
He is considered an established member of the party.
He began his political career as a college student in communist youth groups.
He is widely thought to have a close relationship with General Secretary Nguyen Phu Trong, Vietnam's most powerful leader.
Trong is the main official behind the party's battle against corruption.
The anti-corruption campaign "will not cool down in the foreseeable future," said Florian Feyerabend.
He is the representative in Vietnam for Germany's Konrad Adenauer Foundation.
Diplomats and businesspeople have raised concerns about the anti-corruption campaign because it has limited many normal deals in Vietnam.
And officials fear being caught up in the crackdown.
A Hanoi-based diplomat told Reuters that Thuong's election was a major step by General Secretary Trong in the competition to succeed him.
The 78-year-old leader may step down before the end of his third term in 2026.
Thuong was elected with 98.38 percent of the votes, the parliament's website says.
I'm Dan Novak.