BEIJING — President Xi Jinping set China on course to follow his hard-line authoritarian rule far into the future on Sunday, when the national legislature lifted the presidential term limit and gave constitutional backing to expanding the reach of the Communist Party.

Under the red-starred dome of the Great Hall of the People in Beijing, nearly 3,000 delegates of the National People’s Congress, the party-controlled legislature, voted almost unanimously to approve an amendment to the Constitution to abolish the term limit on the presidency, opening the way for Mr. Xi to rule indefinitely.

The amendment was among a set of 21 constitutional changes approved by the congress, which included passages added to the Constitution to salute Mr. Xi and his drive to entrench party supremacy.

Mr. Xi is using his formidable power to dismantle parts of the political order set in place in the 1980s and 1990s by Deng Xiaoping, who led China on a path of economic opening and liberalization. This includes the system of collective leadership and regular, orderly transitions of power that became the norm after Deng died in 1997.