Vietnam's ruling Communist Party has re-elected Nguyen Phu Trong as general secretary for a second term.
The central committee vote came at the end of the five-year party congress and had been expected after reformist Prime Minister Nguyen Tan Dung withdrew.
Mr Trong, who is 71 and effectively the most powerful man in Vietnam, was the only candidate nominated. He is seen as a conservative and closer to China.
The closed-door meeting has been overshadowed by political infighting.
Agreement on the party leadership is traditionally reached well in advance of the congress, which concludes on Thursday.
"Delegates to the first meeting of the party's central committee congratulated Comrade Nguyen Phu Trong who was elected general secretary," the official Vietnam News Agency reported.
Analysts believe one-party Vietnam will continue with economic reforms, but steer clear of major political changes.
Mr Dung, the reformist prime minister, pulled out of the contest on Monday, after failing to win sufficient support among the 1,510 congress delegates.
His political career is in effect over, correspondents say.
Conservatives, led by Mr Trong, are concerned that Vietnam is abandoning its socialist past under Mr Dung, who will step down later this year.
As well as the party's general secretary, the congress nominates the next president and prime minister.
Deputy Prime Minister Nguyen Xuan Phuc, who was also elected to the politburo, is now expected to replace Mr Dung as prime minister. Tran Dai Quang, currently minister of public security, will be the new president, officials say.
During his 10 years in office Mr Dung has driven the reforms which have seen Vietnam grow quickly as it has been integrated into the global economy.
However, conservatives have criticised the speed of the prime minister's reforms and rising corruption.
Mr Dung is seen as modern, and friendly towards the US. He has also gained popularity domestically with strong anti-China rhetoric when it comes to disputed territory in the South China Sea.
Mr Trong is seen to be more friendly towards China - Vietnam's largest trading partner.
How new leaders are chosen:
- Delegates elect a new central committee
- On one of the last days of the congress, the new central committee meets to select a 16-member politburo from among its ranks
- From within the politburo a general secretary, prime minister and president are nominated
- The general secretary needs approval from congress
- The prime minister and president will be approved by the national assembly in about six months time - however this is normally just rubber stamping