BEIJING (Reuters) - China's president-in-waiting Xi Jinping has praised his predecessor Hu Jintao for voluntarily stepping down from both his party and military posts, promising to uphold his legacy of defense modernization, state media said on Saturday.

Hu, who remains China's president until March's parliament session, relinquished the much more powerful post of Communist Party boss on Thursday at the close of the once-every-five-year congress that selects the party's new leadership line-up.

The question had loomed whether Hu would stay on as head of the powerful Central Military Commission, thereby preventing a full takeover of the party and armed forces by Vice President Xi.

Hu's predecessor Jiang Zemin remained chief of the military commission for two years after Hu took over as president and party boss.

"Chairman Hu, giving full consideration to the development of the party, country and military, voluntarily proposed no longer holding the positions of party general secretary or chairman of the military commission," the official Xinhua news agency cited Xi as saying.

"The entire 18th Party Congress respected Chairman Hu's willingness (to step down), and agreed to his request," Xi said at a military commission meeting held on Friday.

"Chairman Hu's very important decision fully showed his deep consideration toward the development of the Party, the country and military, and fully showed his foresight as a Marxist statesman and strategist, and his broad mind and noble character," Xi added, using typically turgid communist phraseology.

Hu had made modernizing China's outdated, massive armed forces a key platform of his time in office, overseeing the launch of the country's first aircraft carrier and development of stealth fighters.

Xi said the military must "work hard to promote its revolutionary modernization".

He added that the party must "unswervingly" remain in control of military, reflecting the leadership's determination to ensure that the People's Liberation Army remains the ultimate shield of their authority.

"Ensuring the absolute leadership of the party over the military ... concerns the lasting stability of the party and the country," Xi said.

(Reporting by Terril Yue Jones; Editing by Ben Blanchard)