Chinese leader Xi Jinping was awarded a third five-year presidential term on Friday, putting him on track to stay in power for life at a time of severe economic challenges and rising tensions with the United States and others.

Approval of Xi’s appointment by the ceremonial National People’s Congress was a foregone conclusion for a leader who has sidelined potential rivals and filled the top ranks of the ruling Communist Party with his supporters since taking power in 2012.

The vote for Xi was 2,952 to 0 by the NPC, whose members are appointed by the ruling party.

Xi appointed himself to a third five-year term as party general secretary in October, breaking a tradition of Chinese leaders handing over power once a decade. A two-term limit for the flagship presidency was removed from the Chinese constitution earlier, prompting suggestions he could retain control for life.

No candidate lists were handed out, and Xi and those awarded other posts were believed to have run unopposed. The electoral process remains almost entirely shrouded in secrecy, apart from the process by which delegates to the Congress place four ballots in boxes in the Great Auditorium of the Great Hall of the People.

Xi was also unanimously named commander of the 2 million-member People’s Liberation Army, which explicitly takes orders from the party.

The Communist Party’s third-ranking official, Zhao Leji, was named head of the National People’s Congress. Most of the body’s legislative work is led by its standing committee, which meets year-round.

A takeover from the former party’s Politburo Standing Committee, the pinnacle of political power in China, headed by Zhao, Xi won Xi’s trust as head of the party’s anti-corruption watchdog, the Central Commission for Discipline Inspection – which is running an anti-graft campaign that has been frozen any potential opposition to the leader.

Shanghai’s former party chief and Politburo Last Standing Committee member Han Zheng was appointed to the largely ceremonial post of state vice president.