BEIJING (Reuters) - China removed presidential term limits from its constitution on Sunday, giving President Xi Jinping the right to remain in office indefinitely, and confirming his status as the country's most powerful leader since Mao Zedong died more than 40 years ago.

China's ruling Communist Party announced the proposed amendment only last month and there was never any doubt it would pass as parliament is packed with loyal party members who would not have opposed the proposal.

The amendments also include inserting Xi's political theory into the constitution, something that was already added to the party charter in October at the end of a party congress, a feat no other leader since Mao had managed while in office. Additionally, clauses were included to give a legal framework to a new super anti-corruption department.

Only two "no" votes were cast, with three abstentions, from almost 3,000 delegates.

Reporters were briefly ushered from the main hall in the Great Hall of the People as delegates filled in their ballot papers, but allowed in to see them placing the papers, one by one, into large red ballot boxes around the room.

Xi cast his vote first, on the podium at the front of the hall, followed in turn by the other six members of the party's elite Standing Committee, which runs China.

The room erupted into loud applause when the result of the vote was passed, though Xi did not address parliament.

The limit of two five-year presidential terms was written into China's constitution in 1982 after Mao's death six years earlier by Deng Xiaoping, who recognised the dangers of one-man rule and the cult of personality after the chaos of the Cultural Revolution and instead espoused collective leadership.

Speaking later to reporters, Shen Chunyao, chairman of the Legislative Affairs Commission of parliament's standing committee, dismissed concerns the move could risk a return to strongman rule or lead to political turmoil or infighting.

"As for the assumptions, conjecture and stretched situations in your question, I think that does not exist," Shen said.

In the past nine decades of the party's history it has overcome hardships and resolved major problems, including orderly leadership transitions and keeping the party and country's vitality and long-term stability, he added.

"In the nearly 40 years of reform and opening up, we have successfully established, upheld and expanded the political development road of socialism with Chinese characteristics," Shen said.

"So, going forward the road we are on will definitely be longer and wider, and the future brighter and brighter."

CULT OF PERSONALITY

Xi, 64, swiftly consolidated power after taking over as party chief in late 2012, and the move to lift the presidential term limits is not unexpected.

In the run up to the vote, critics on Chinese social media attacked the move and drew parallels to North Korea or suggested a Mao-type cult of personality was forming. But the government quickly mounted a propaganda push, blocking some comments and publishing pieces praising the proposal.

The party loyalists who attend the annual session of parliament have said the decision is popular with ordinary Chinese people and asserted that China was lucky to have a leader of Xi's calibre.

"Protecting the country's long-term stability is an extremely good thing," Cheng Bingqiang from Sichuan province told Reuters shortly ahead of the vote, when asked if he worried about Xi being in office forever.

He Guangliang from the southwestern province of Guizhou said it wasn't fair to draw comparisons with North Korea.

"China has it's own national characteristics," He said. "There's no one system that suits all countries."

However the question was too sensitive for several legislators, who scurried away when asked about Xi being in office forever.

"You can't ask me that," said one lady, laughing nervously and declining to give her name.

In a further measure of Xi's strength, a key Xi ally, former top graft-buster Wang Qishan, could be elected vice president on Saturday, having stepped down from the Standing Committee in October.

He cast his vote right after the seven members of the Standing Committee. The amendment also lifts term limits for the vice presidency.

"We've not got around to discussing that yet," Chen Yunying, a senior defector from self-ruled Taiwan who is married to Justin Yifu Lin, the World Bank's former chief economist.

"We'll get it in the next few days," she told Reuters, referring to the candidate list for vice president, and adding "everyone has been saying" it will be Wang for the position.

CONSOLIDATING POWER

Xi began his second five-year term as party chief in October and at the end of the week will be formally appointed by parliament to his second term as president.

The government has said lifting the term limits is about protecting the authority of the party with Xi at its centre. The party's official People's Daily has said this does not mean life-long terms.

The party gave Xi the title of "core" leader in 2016, a significant strengthening of his position at the time.

While the presidency is important, Xi's positions as head of the party and head of the military are considered more important, and these titles are always given first by state media. With the passage of the amendment, now none of the posts have formal term limits.

(Reporting by Ben Blanchard; Additional reporting by Michael Martina; Editing by Michael Perry, Shri Navaratnam and Mark Potter)