Nightclubs have been raided, TV dramas targeted by censors and football matches postponed -- China is tightening security and discipline to ensure a landmark Communist Party meeting passes off flawlessly.

The police and censorship organs have kicked into high gear to prevent anything overshadowing the week-long, twice-a-decade congress which opens on October 18.

The gathering is expected to hand President Xi Jinping a second five-year term as general secretary of the Communist Party, solidifying his position as the most powerful Chinese leader in a generation.

Red banners that "warmly welcome" the 19th Party Congress have appeared across Beijing and officials hope to clear the capital's notoriously smoggy skyline when more than 2,300 delegates gather.

Mayor Cai Qi has reportedly warned the city "must hold the line for social control, eliminate all destabilising factors, hold the line for cyber security, and resolutely crack down on political rumours and harmful news".

China often orders mass factory closures to clean up chronically polluted skies during key events, such as the 2008 Olympics.

"We have to do a good job in assuring air quality... and fight to win the war of maintaining blue sky," Cai told city cadres, also urging them to guarantee "zero errors" in food safety for delegates and impeccable traffic control.

- Club raids -

In late September, some 400 railway security personnel held tactical exercises in preparation for the congress, China National Radio reported.

Photos showed police undergoing a hostage-taking exercise where SWAT-uniformed officers used ropes to scale a building and rescue a dangling captive.

The department had to "make every effort to prevent any dangerous thing from happening or a dangerous person from entering the capital via the railways and ensure absolute safety," Beijing Railway Public Security Department Political Committee member Yan Li told China National Radio.

A variety of entertainment has been put on hold.

Story continues

A football match between the capital's home team Guoan and Chongqing's Dangdai Lifan scheduled for the weekend before the congress was shifted to later this month "due to a major event," the China Football Association said.

At a comedy show last month, a Beijing venue was raided by police who asked foreigners to show their papers and submit to urine tests for drugs.

A music and dance club cancelled shows planned for the two weeks around the congress, but said it was "too sensitive" to say why.

Some foreigners have been visited at home by police asking to see visas and paperwork.

One foreign journalist said police came to his home at nearly midnight recently to confirm details about his employment, housing contract and roommates, explaining they needed to check up on foreigners during this "special time".

- 'Thank god for the congress' -

Even certain television shows have been paused.

The censorship bureau released a notice in July calling for provincial TV stations to stop broadcasts of period costume and teen idol dramas "in order to stay in step with the overall atmosphere" of seriousness surrounding the congress.

It issued a list of approved series it said would generate "a good cultural atmosphere during the key propaganda period," mostly war sagas such as "The Farmer who was a General".

In late September, Hubei Province TV said it had replaced "Informal Talks," a popular talk show of foreigners discussing China's social problems in Chinese, with one called "Glorious China" in order to "welcome" the congress.

China operates one of the most restrictive internet censorship regimes in the world, swiftly deleting content deemed politically sensitive and often moving to curb viral stories, for fear they might exert social influence beyond the party's control.

When Lu Han, a heartthrob actor and singer known as China's Justin Bieber, crashed the servers of Twitter-like Weibo on Sunday by generating too much web traffic with a post introducing his new girlfriend, most mainland media outlets remained silent.

"Thank god for the 19th Party Congress! Saved us from having to report on celebrity gossip," one reporter quipped.