BEIJING - Li Peng, a former hard-line Chinese premier best known for announcing martial law during the 1989 Tiananmen Square pro-democracy protests that ended with a bloody crackdown by troops, has died. He was 90.

China's official Xinhua News Agency said Li died Monday of an unspecified illness. His death was not announced until Tuesday evening.

Li, a keen political infighter, spent two decades at the pinnacle of power before retiring in 2002. He left behind a legacy of prolonged and broad-based economic growth coupled with authoritarian political controls.

While broadly disliked by the public, he oversaw China's reemergence from post-Tiananmen isolation to rising global diplomatic and economic clout, a development he celebrated in public statements that often were defiantly nationalistic.

“Ridding themselves from the predicament of imperialist bullying, humiliation and oppression, the calamity-trodden Chinese people have since stood up,” Li said in 1995 in a speech for the Oct. 1 anniversary of the 1949 revolution that brought the ruling Communist Party to power.

One reminder of Li will likely stand for ages to come: During his final years in power, he pushed through approval for his pet project - the gargantuan $22 billion Three Gorges Dam on the Yangtze River, which forced 1.3 million people to leave homes that were swallowed up by its enormous reservoir.

Li, who became acting premier in November 1987, triumphed over pro-reform party leader Zhao Ziyang in 1989 after the fellow native of Sichuan province was toppled from power for sympathizing with the student protesters at Beijing's Tiananmen Square.

“The situation will not develop as you wish and expect,” an angry Li told student leaders in a confrontational meeting on May 18, 1989.

The next night, Li, flushed with anger, went on national television to announce martial law in Beijing.

“The anarchic state is going from bad to worse,” he said. “We are forced to take resolute and decisive measures to put an end to the turmoil.”

On the night of June 3-4, troops invaded the city, killing hundreds, and perhaps thousands, of Beijing residents on their way to ending the student occupation of Tiananmen Square.

China acknowledged Li's role, but in a positive way, in a lengthy eulogy read Tuesday night by a newscaster on state broadcaster CCTV.

Li joined the majority of the leadership in taking “resolute measures to prevent turmoil, quell the counter-revolutionary riots and stabilize the domestic situation,” the eulogy read in part. “He played an important role in the great struggle that concerns the future and destiny of the party and the nation.”

Li stepped down as premier in 1998, becoming chairman of the National People's Congress, China's parliament. He retired from the party's seven-member ruling Standing Committee in 2002 as part of a long-planned handover of power to a younger generation of leaders headed by Hu Jintao.

In his later years, Li rarely appeared in public, and was usually seen only at official gatherings aimed at displaying unity, such as the 80th anniversary of the founding of the People's Liberation Army in 2007.

As his profile waned, he reportedly began lobbying older colleagues to support his children's political ambitions. One of his two sons, Li Xiaopeng, was the governor of Shanxi province before becoming transport minister in 2016.

Li returned to the headlines in 2010 when a Hong Kong publisher announced he had Li's purported memoir on the Tiananmen Square crackdown. The publisher later halted the book's release, claiming copyright problems, but supposed excerpts of the diaries were leaked online.

A cautious and uninspiring figure, Li was one of the few leaders to inspire real dislike among the nation's masses, although he was said to inspire loyalty among his subordinates.

Born in October 1928 in Chengdu, a city in southwestern China, he was adopted by the late Premier Zhou Enlai after Li's father, an early communist revolutionary, was killed by the rival Nationalists in 1931.

He shrugged off questions of nepotism, saying he was one of many war orphans cared for by Zhou and his wife, Deng Yingchao. But he did say that “their ideals and moral influence had a profound influence on my upbringing.”

Li joined the Communist Party in 1945 after joining Zhou, Mao Zedong and others at their wartime guerrilla base of Yan'an in the northwest.

After spending six years as an engineering student in Moscow, Li worked as an engineer for a decade in northeastern China.

He was named director of the Beijing Electric Power Administration in 1966, and according to official biographies, was responsible for ensuring a stable power supply to Beijing and Tianjin during the chaos of the Cultural Revolution.

Li headed what was called the “power industry family.” His daughter Li Xiaolin was a prominent figure in the state power sector. Her retirement as CEO of China Power International Development in 2015 was seen by some as part of current Chinese President Xi Jinping's moves to uproot leaders' children from highly visible positions in the state sector.

Li rose quickly after 1979, and in 1985 became a member of the party's decision-making Politburo with an education portfolio.

It was in that role that he established himself as a conservative, telling students in 1985 that China can never become capitalist: “To allow bourgeois freedoms would only make our country's affairs chaotic.”

His tough stance when students staged pro-democracy demonstrations in Beijing, Shanghai and other cities in late 1986 and early 1987 helped him win a post on the powerful Politburo Standing Committee, leading to his showdown with the reform-minded Zhao over Tiananmen in 1989.