A protege of Zhou Enlai, who became the first premier of the People’s Republic of China after Communist victory in 1949, Mr. Li proved a durable political operator amid the tumult of Mao Zedong’s rule and for long afterward. He was a Russian-trained technocrat who spent decades as a power-plant and central planning administrator, jobs that shaped China’s economic transformation and aided his rise in the Communist Party’s hierarchy.

Mr. Li attends the 2017 opening session of the National Congress of the Communist Party of China in Beijing. (Jason Lee/Reuters)

Paramount leader Deng Xiaoping hand-selected Mr. Li to join the highest echelons of the Communist Party in 1987, naming him premier. Mr. Li served until 1998 and then was chairman of China’s top legislative body, the Standing Committee of the National People’s Congress, until 2003.

He was at the forefront of Chinese politics for decades, but his name is inextricably linked to the military assault on unarmed protesters in Tiananmen Square on June 3 and 4, 1989.

As premier, Mr. Li was the face of a group of hard-liners who saw the student-led movement against one-party rule as a threat to their authority and national stability. It was Mr. Li who declared martial law, paving the way for troops to enter the city in late May 1989. He also played a key role in the decision to send troops to clear the square, killing hundreds, perhaps thousands, as they went.

Photo Gallery: Remembering those who have died in 2019.

In an official announcement read on state television Tuesday, the Chinese leadership described Mr. Li as taking “decisive measures to stop the unrest, quell the counterrevolutionary riots and stabilize the domestic situation” during a period of “political turmoil at the turn of the spring and summer of 1989.”

Zhou Fengsuo, a student leader during the 1989 protests and the No. 5 most wanted man in China in the aftermath, said Mr. Li left an unpaid “debt of blood.”

“Sins were not tried, justice was not upheld,” Zhou said in a message. “Death cannot wipe out the crimes.”

China at a crossroads

The late 1980s found China’s leaders split on where to take the country, with reformers such as Secretary General Hu Yaobang and the man who succeeded him, Zhao Ziyang, pushing economic and political liberalization and others, including Mr. Li, pushing for a more centralized, state-led approach.

In 1986, students in cities across China demonstrated to demand political reform. Hu was blamed for the unrest and ousted as general secretary.

When Hu died, in April 1989, thousands took to the streets in a display of grief that morphed into mass protest. They demanded checks on government corruption, political reform and talks with top officials.

The protesters set up outside the Great Hall of the People, on the western edge of Tiananmen Square, and eventually started a hunger strike.

On May 18, as the standoff deepened, Mr. Li met with student leaders for a nationally televised dialogue. In footage that shocked the nation, Mr. Li, looking imperious in his tunic-like Mao suit, was scolded and interrupted by students, including a hunger striker still in his hospital gown.

The next day, Zhao and Mr. Li went to meet with students in the square. Zhao tried to broker peace by praising the students’ good intentions, but he urged them to end their strike and leave the square.

“We’ve come too late,” Zhao told the students. “The problems you have raised will eventually be resolved. But things are complicated, and there must be a process to resolve these problems.”

But with thousands marching and holding hunger strikes in the capital and many more flooding the streets of Shanghai in a show of solidarity, Mr. Li declared martial law on May 20, ordering tanks and troops into the capital. Beijing residents erected barricades to block their advance.

In the days that followed, more than 1 million people defiantly took to Beijing’s streets with the rallying cry “Li Peng must step down.”

What happened next is still debated — and may be forever. According to the “Tiananmen papers” — a collection of documents leaked by an unknown Chinese source and vetted and published by U.S. China scholars in 2001 — at a June meeting of top leaders, Mr. Li made a case for clearing the square.

“It is becoming increasingly clear,” he reportedly told his comrades, “that the turmoil has been generated by a coalition of foreign and domestic reactionary forces, and that their goals are to overthrow the Communist Party and to subvert the socialist system.”

The next day, troops advanced. For his role as the face of the massacre that followed, Mr. Li is reviled by survivors, witnesses and many others in China, but over the decades he was protected and promoted by a party unwilling to revisit the decision to use force against Chinese civilians.

The official verdict on Tiananmen is that what happened was necessary — to criticize Mr. Li would be to criticize the party. China scrubbed the incident from textbooks. Web searches for “Tiananmen Square” and “6/4” are censored.

“It’s impossible to divorce Li Peng’s legacy from his role in the Tiananmen Square crackdown,” said Jude Blanchette, a scholar of Chinese politics and author of the 2018 book “Under the Red Flag: The Battle for the Soul of the Communist Party in a Reforming China.” “When it came time to decide the future direction of China, Li chose the party’s security over the people’s freedom.”

A red pedigree

Mr. Li was born in Chengdu, the capital of Sichuan province, on Oct. 20, 1928, during the early days of the conflict between Chiang Kai-shek’s nationalist Kuomintang forces and Mao’s Communist Party.

His father, Li Shouxun, was a writer who took part in an uprising against the Kuomintang authorities in 1927 and was arrested and executed in 1930. Party lore holds that Mr. Li was later taken in by Zhou Enlai, a close friend of his father’s, and Zhou’s wife, Deng Yingchao.

In his official memoir, Mr. Li denied that he was officially adopted. “Some people have said I am Premier Zhou’s adopted son. It is not true,” he wrote. “The relationship between Premier Zhou, Mother Deng and me was the relationship between old comrades and any martyrs’ descendants.”

In any case, Mr. Li’s ties to Zhou made him a standout member of China’s “red second generation,” a group of the children of revolutionary heroes that also includes China’s current president, Xi Jinping. Mr. Li was sent to Yan’an, a communist base, for schooling, and later studied hydroelectric engineering at the Moscow Power Engineering Institute. While in the Soviet Union, he was president of the Association of Chinese Students in the U.S.S.R., which helped him forge connections to many who went on to hold important government positions.

Mr. Li returned to China in 1955 as the country was making the leap toward industrialization. He was first sent to run power plants in the northeast. Then, in the mid-1960s, he was assigned to run Beijing’s electric power administration.

The young technocrat’s red pedigree protected him from the bloody purges of the Cultural Revolution from 1966 to 1976. In 1979, he was appointed a vice minister of the power industry, followed rapidly by membership on the powerful Central Committee and the ruling Politburo. By the restless spring of 1989, he was serving his first term as China’s premier.

Mr. Li spent the rest of his life in the shadow of his Tiananmen decisions — unpopular, but protected and promoted by the party.

In the wake of June 4, Zhao Ziyang lost his job and was put under house arrest. Mr. Li stayed on as premier, then became chairman of China’s rubber-stamp parliament, overseeing economic changes that helped many, including members of his family, get rich.

He backed the construction of the Three Gorges Dam, a massive hydroelectric project that spanned the Yangtze River, displaced an estimated 1 million people and was dogged by allegations of environmental destruction and rampant corruption.

Though the dam was — and still is — a source of controversy, he managed to maintain a role in China’s power sector, eventually handing major monopolies to his children, who continue to wield influence. In April 2018, President Xi, whose appearances are carefully choreographed, was photographed touring the site with Mr. Li’s son, Li Xiaopeng, now minister of transportation.

In addition to his wife, Zhu Lin, and Li Xiaopeng, survivors include two other children, Li Xiaolin and Li Xiaoyong.

The family’s riches last made headlines in 2016, when Li Xiaolin was named in the Panama Papers, a massive report about the alleged offshore dealings of the global elite. She became known as the “Power Queen” for her role in the country’s state power sector. In 2012, an image of her wearing a pink Pucci pantsuit to political meetings in Beijing caused an Internet sensation.

If Mr. Li regretted his role in the Tiananmen crisis, he did not say so — not directly, anyway. But in a 2004 essay published in a party magazine called Seeking Truth, he seemed to try to clear his name, shifting the focus to his mentor, Deng, who died in 1997, by appearing to praise him.

“In the spring and summer of 1989, a serious political disturbance took place in China,” he wrote. “With the boldness of vision of a great revolutionary and politician, comrade Deng Xiaoping — along with other party elders — gave the leadership their firm and full support to put down the political disturbance using forceful measures.”

Blanchette said that Mr. Li’s death “will undoubtedly prompt some attempt to rehabilitate, and a commemoration of his life will be used to smuggle in a political agenda. But unlike Mao Zedong or Deng Xiaoping, Li Peng never inspired with a vision other than the narrow vision of the party’s perpetual monopoly.”

With his fellow “red aristocrat” Xi Jinping in control, his reputation as a party stalwart looks safe.

Amber Ziye Wang and Gerry Shih in Beijing contributed to this report.

Correction: An earlier version of this report incorrectly stated that Mr. Li was elevated to head of the Communist Party in 1987.