Chinese President Xi Jinping attends Roundtable Summit Phase One Sessions of Belt and Road forum on May 15, 2017.

China's largely rubber stamp parliament on Sunday passed a series of constitutional amendments, including one that removes presidential term limits, allowing President Xi Jinping to remain in office indefinitely.

The announcement of the vote, witnessed by reporters in the Great Hall of the People, passed with two "no" votes and three abstentions among almost 3,000 delegates.

China's ruling Communist Party proposed the amendment 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.

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

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 President Xi's caliber.

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.