China's President Hu Jintao has warned the Communist Party that corruption could cost it the support of the people - in a speech marking 90 years since the party was founded.
Mr Hu said the "incompetence" of some members had caused problems for China.
But he praised the party's record since taking power in 1949.
The party has orchestrated hundreds of events for the anniversary, including a flag-raising ceremony in Beijing attended by thousands of loyalists.
The country's rulers have been planning the anniversary celebrations for years.
A big-budget epic film entitled Beginning of the Great Revival, starring many of the country's leading actors, was released this month.
And TV stations were ordered months ago to ditch light programmes such as detective dramas and replace them with coverage of patriotic events.
But the authorities have also launched their biggest crackdown against dissidents in almost 20 years.
Activists and lawyers have been detained, and religious groups have been suppressed.
In his 90-minute speech, Mr Hu acknowledged that the party had made mistakes in the past.
But much of the address concentrated on the achievements of the party "in revolution, development and reform".
He warned that the party was "confronted with growing pains", and that the "incompetence" of some members and their "being divorced from the people" had created problems for the country.
"Corruption will cost the party the support and trust of the people," said Mr Hu, who is due to step down as party leader next year.
"We must not turn our power into an instrument for making personal gain for a handful of individuals. It is more urgent than ever for the party to impose discipline on its members."
The party has been waging a campaign against corruption for years, with senior officials among those to have been executed for corrupt practices.
Recently China's central bank estimated that more than $120bn (£74bn) had been stolen by employees of state-owned firms since the mid-1990s.
At a local level, long-held grievances against the corrupt practices of petty officials have erupted into violent protests in several areas.
Criticism of corruption at a local level is often carried in state-owned newspapers, but the government tolerates no wider questions about the party's right to rule.
The president's speech was one of hundreds of events that have been organised to celebrate the founding of the party.
There have been gala performances, celebratory television programmes and singing contests.
The government also launched a new $30bn high-speed rail link, which it promised to get up and running before the anniversary.
The country's first aircraft carrier may begin sea trials on Friday.
Although the Chinese are celebrating the anniversary on Friday, the party's first congress took place on on 23 July.
The party took power in 1949 after defeating the Kuomintang (Nationalist Party) in a long and bloody civil war.
Under Mao Zedong, the party began the Great Leap Forward in 1958, a campaign to increase industrial production during which tens of millions starved to death.
Millions more are thought to have died during the Cultural Revolution, a crusade launched by Mao in 1966 to purify the party.
After Mao's death in 1976, his successor Deng Xiaoping introduced market reforms which helped turn China into the world's second-largest economy.
The BBC's Michael Bristow in Beijing says hundreds of millions no longer battle poverty, but the party continues to rule because it refuses to hand power to anyone else.