BEIJING — While alive, Li Rui was a decades-long headache for China’s ruling Communists — a former aide to Mao Zedong who became an obdurate, sharp-tongued critic of the party. And the controversy did not stop in death, even for his funeral.

Hundreds of people gathered in Beijing on Wednesday to say goodbye to Mr. Li, four days after his death at 101. But the funeral revealed tensions between the government, which wanted a brisk Communist ceremony, and mourners who celebrated Mr. Li as a renegade — one who, even as he lay dying, railed against the authoritarian policies of Xi Jinping, the party’s leader and China’s president.

Mr. Li’s daughter, Li Nanyang, stayed away from the ceremony at Babaoshan cemetery in the capital’s west, where members of China’s political elite are cremated and laid to rest. She said her father had not wanted a stiff, official funeral featuring cookie-cutter eulogies or “red” symbolism that would suggest he had remained devoted to the party.

“He wished to be remembered as Li Rui, not as a Communist Party cadre enjoying ministerial-level official protocol,” Ms. Li said by telephone from California, where she lives, before the funeral.