BEIJING – China named the Communist Party's No. 2 leader, Li Keqiang, premier on Friday as a long-orchestrated leadership transition nears its end, leaving the new leaders to confront uneven economic growth, unbridled corruption and a severely befouled environment that are stirring public discontent.

The rubber-stamp legislature endorsed Li for the post, voting 2,940 in favor, with three opposed and six abstaining. A day earlier, the legislature similarly appointed Xi Jinping to the ceremonial post of president, making him China's pre-eminent leader following his ascent last November to head the Communist Party and the military.

Though the outcome of the legislative session was a foregone conclusion, it's the result of years of fractious behind-the-scenes bargaining. They hail from different factions: Li Keqiang (pronounced lee kuh chahng) is a protege of the now-retired President Hu Jintao while Xi Jinping (pronounced shee jin ping) is the son of a revolutionary veteran with backing among party elders.

After Li's selection was announced, he and Xi shook hands and smiled for photographers in the Great Hall of the People. Evidence of their and their patrons' ability to forge consensus will be seen Saturday when appointments to the Cabinet and other top government posts are announced.

The son of a revolutionary veteran, Xi cuts an authoritative figure with a confidence and congeniality that was lacking in his predecessor, the aloof and stiff Hu. New Premier Li, from a low-level officials' household, has appeared to be a cautious administrator, like Hu, and has not been associated with particular policies on his rise.

Together, Xi and Li now steer a rising global power beset with many domestic challenges that will test their leadership. Chief among them are a sputtering economy that's overly dominated by powerful state industries.

Chinese leaders want to nurture self-sustaining growth based on domestic consumption and reducing reliance on exports and investment. Consumer spending is rising, but not as fast as Beijing wants, which has forced the government to support an economic recovery with spending on public works and investment by state companies.

"If the official data is to be believed, China has been moving in the wrong direction for the past decade — towards 'more investment, less consumption,'" wrote Standard Chartered economists Stephen Green and Wei Li in a research note. "This could create problems."

An increasingly vocal Chinese public is expressing impatience with the government's unfulfilled promises to curb abuses of power by local officials, better police the food supply and clean up the country's polluted rivers, air and soil.

"What do ordinary people care about? Food safety, and smog if you are in a big city, and official corruption," said Chinese author and social commentator Murong Xuecun, the pen name of author Hao Qun. "They just want to have a peaceful, stable and safe life. To have money and food, and live without worry of being tortured, or having their homes forcefully demolished."

"The entire country is watching for Xi's next step," the writer said.

Wu Xiangdong, chairman of a wine company in central Hunan province and one of the congress delegates who poured out of the vast, ornate Great Hall of the People after Friday's vote, said expectations also were high for Li, the new premier.

"We are very excited and look forward to the premier and the new generation of leaders to be better able to work on the economy, food safety, the environment and improving social equality," Wu said.

Xi's accession marks only the second orderly transfer of power in more than six decades of Communist Party rule. Underlining that transition, after the result of Thursday's vote was announced, the 59-year-old Xi bowed to delegates and turned to his predecessor, Hu. The two shook hands and posed for photos.

Governing China is often plodding as leaders, none of them politically strong enough to prevail individually, forge consensus with their colleagues in the collective leadership.

In some intriguing signs of the new leadership's direction, the congress on Friday appointed as supreme court president Zhou Qiang, a provincial party secretary with a reputation as a progressive and a former aide to a well-known legal reformer. On Thursday, another liberal-minded reformer and a close ally of Hu, Li Yuanchao, was named vice president, breaking with the practice of recent years because he is not in the party's seven-member ruling inner sanctum.

Early indications of the new government's priorities came in a policy program delivered during last week's opening of the legislative session. It pledged to clean up the country's environment, fight pervasive graft and official extravagance and improve welfare benefits for the poor.

The report promised to give private companies a fairer chance to compete, but did not say how Beijing would deal with big state companies controlling most of China's industries that economists have warned need to be curbed in order to preserve future growth. Many experts fear the government will be too hamstrung by powerful interest groups, linked to state industries, to be able to make these changes. But few doubt the urgency of the reform that's needed.