Chen Xitong, a former mayor of Beijing who backed the military crackdown on the Tiananmen Square democratic movement during his term, died June 2 in Beijing of cancer, according to Chinese media reports.

His death, at 82, came two days before the 24th anniversary of the bloody quelling of the student-led movement.

At the height of his career, Chen was one of China’s most powerful men, but an anti-corruption campaign brought about a spectacular downfall.

Mr. Chen’s death so close to the politically sensitive date posed additional difficulties for the government, which has tried to erase mention of the 1989 events.

Mr. Chen was long portrayed as having supported the military assault that crushed the weeks-long protests, killing hundreds, possibly thousands, of people. But he apparently had a change of heart late in his life and was quoted in a book published last year as saying that the crackdown was an avoidable tragedy and that he regretted the loss of life.

Former Beijing Mayor Chen Xitong in March 1990. (Mark Avery/AP)

A native of Sichuan province, Mr. Chen studied Chinese at Peking University and joined the Chinese Communist Party in 1949, months after the People’s Republic of China was founded.

He rose through the ranks in Beijing and, in 1983, was appointed the city’s mayor, a position he held until 1993. He was also promoted to Beijing Communist Party boss and given a seat on the party’s Politburo, the apex of Chinese political power.

A massive graft scandal that may have cost the city more than $2 billion resulted in his downfall in 1995. Mr. Chen was given a 16-year prison term, effectively silencing him. In sentencing him in 1998, a Beijing court said that Mr. Chen pursued a “corrupt and decadent life” that featured lavish partying at two villas built with public funds.

By 2006, Mr. Chen had reportedly been released on medical parole for cancer treatment. He looked set to fade into the annals of Chinese political history but for the publication of the book in Hong Kong last year based on comments he made in interviews with a retired scholar, Yao Jianfu.

Yao said Mr. Chen denied being directly responsible for the Tiananmen crackdown and thought it should never have happened. He urged a reinvestigation of the crackdown to determine how many people were killed and other facts.

No details were available about survivors.