Pupils attend a celebration of the 90th anniversary of the founding of the Communist Party of China at a primary school on March 28, 2011 in Chongqing, China. (ChinaFotoPress/GETTY IMAGES)

China’s Communist Party has finally got its story straight. It took 16 years of editing and four extensive rewrites. Chinese leaders, otherwise preoccupied with running a rising superpower, weighed in throughout.

“I never thought it would take so long,” said Shi Zhongquan, who helped craft what the party hopes will be the final word on some of the most politically sensitive and also bloodiest episodes of China’s recent history — a new 1,074-page account of the party’s early decades in power.

As China races into the future, the Communist Party — which marks its 90th birthday in July — still takes the past, especially its own, very seriously. “Writing history is not easy,” said Shi, a veteran party historian.

It gets particularly hard when it includes not only two of the past century’s most lethal man-made catastrophes — the Great Leap Forward and the Cultural Revolution — but also a modest yet now ticklish upset back in 1962 — the disgrace of Xi Zhongxun, the father of Xi Jinping, China’s current vice president and leader-in-waiting.

“It’s an old communist joke that Marxists can predict the future, but the past is more difficult,” said Roderick Macfarquhar, a Harvard University scholar and leading authority on Chinese politics under Mao Zedong, who died in 1976. The past, added Macfarquhar, “is important because it legitimates the present” and “what went wrong then has to be justified now.”

The party published its first official history 20 years ago but ended the story with Mao’s conquest of China in 1949. It has now ventured into far more treacherous territory with the January publication of “History of the Chinese Communist Party, Volume 2 (1949-1978),” which continues the saga until the year Deng Xiaoping started undoing much of Mao’s legacy.

As China gears up to mark the July anniversary of the party’s founding in 1921, history has become a boom industry. Nobody outside a tiny group of die-hard Maoists wants to revive communes, class struggle and brutal purges. But the party is hammering a message it views as crucial to its grip on power: China’s surging economy and growing international clout are entirely the fruit of uninterrupted one-party rule.

The state poured nearly $400 million into a new National Museum stuffed with revolutionary memorabilia, and millions more into “The Founding of a Party,” a star-studded epic movie due to be released soon. Chinese TV stations, meanwhile, have been told to yank cop shows and focus on airing dramas about party history instead.

Shaping history is particularly important to China’s so-called princelings, the offspring of Mao’s comrades. Having secured influence and often wealth on the basis of their family connections, members of this small but powerful group celebrate a wart-free version of the past that boosts their status — and sidesteps their parents’ role as enforcers and then victims of party brutality.

‘Distort and smear’

Xi, the Politburo member who is due to take over as leader of the party next year and whose father was purged by Mao in 1962, has been particularly active in stressing the need to get history right. In a keynote address at a “history work conference” last summer, he called on all party members — numbering nearly 80 million — to “resolutely combat the wrong tendency to distort and smear the party’s history.” (He didn’t comment on his father.)

Also weighing history has been the son of Liu Shaoqi, a former Chinese president who died in 1969 after being denied medical treatment, having been purged by Mao during the Cultural Revolution. The son, military officer Liu Yuan, wrote in a preface to a new book that “the Party has been repeatedly betrayed by general secretaries, both in and outside the country, recently and in the past.”

Mao, whose portrait hangs above the main gate to the Forbidden City, has taken a beating in recent years from books — all now banned in China — that portray him variously as a megalomaniac, sex maniac and mass murderer.

Standing behind Mao

Shi, a former deputy director of the Party History Research Center, acknowledged wide differences of opinion among scholars, both Chinese and foreign, but said the party was not budging from the line it first fixed in 1981 that Mao made “gross mistakes” but, overall, did far more good than harm. “You can’t attack Mao and not attack the Chinese Communist Party,” Shi said.

So touchy is the party about its past that the new history Shi helped edit had to be vetted by 64 party and state bodies, including the People’s Liberation Army. An initial draft took four years to finish, but that didn’t pass muster with the leadership. It took 12 more years before the Politburo finally signed off on a finished text. This, according to an editor’s note, followed “clear demands regarding revisions” from party chief Hu Jintao, his heir apparent, Xi, and vice president Zeng Qinghong.

The whole process lasted so long that more than a dozen of the scholars involved at the start died before publication. Of an original trio of three senior editors, Shi, now 73, is the only one still alive.

The leadership’s close attention has at least helped boost sales: The two-volume text topped the Beijing News bestseller list for more than a month, due in large part to bulk orders from party units, which have been ordered to study the work.

Regular historians sniff at the whole venture: “This is politics and propaganda,” said Yang Kuisong, a prominent history professor in Beijing. “I have no interest in the topic.”

Unlike China’s recently opened National Museum and other party-sponsored excursions into the past, however, the official history doesn’t simply trumpet triumphs such as China’s first atomic-bomb test in 1964. It also tackles the party’s painful episodes.

The most “sensitive” period to write about, according to Shi, was not the 1966-76 Cultural Revolution, which the party long ago declared a disaster and blamed on the so-called Gang of Four, but the decade before. That was when Mao first turned on many of his former allies, first intellectuals during the so-called anti-rightists campaign, and then senior party officials, including Xi Zhongxun, the father of Xi Jinping, the all-but-certain successor to President Hu.

An early revolutionary and a vice premier, Xi Zhongxun fell from favor in 1962 amid calls by Mao to step up “class struggle” against those accused of seeking to restore capitalism. Xi, who vanished from public view for 16 years, got caught up in an obscure internal feud over a novel called “Liu Zhi Dan.” Mao saw the book as part of an alleged plot to rehabilitate Gao Gang, an earlier purge victim who killed himself.

The new official party history skirts details of the saga and blames Xi’s downfall mostly on the machinations of Mao’s security chief, Kang Sheng. Branding Xi and others as members of “an anti-Party clique” was “totally wrong,” the history says. Xi was finally rehabilitated after Mao’s death.

Tackling the Great Leap

In a lengthy discussion of the Great Leap Forward, a ruinous crash program of industrialization and rural collectivization launched in 1958, the party history acknowledges great suffering and even notes that because of food shortages and illness, China’s population in 1960 fell by 10 million.

But, claiming that Mao’s goal throughout was basically the same as that of China’s current leadership, it says he was driven by “a desire to change a picture of poverty and backwardness and make China grow rich and strong so it could use its own strength to stand tall in the forest of nations.”

Mao, according to the party’s version of events, “realized relatively early through preliminary investigation and research that there were problems in [the Great Leap] movement and worked hard to correct them.”

Frank Dikotter, a Dutch scholar who last year published a study of the period, “Mao’s Great Famine,” dismissed this as a “barefaced lie.” Mao, he said, was indeed aware of the starvation caused by his policies but pressed on, with the result that as many as 45 million people died.

Not recorded in the official history is a 1959 comment by Mao that Dikotter unearthed from a Chinese provincial archive: “It is better to let half of the people die so that the other half can eat their fill.”