Story highlights Beijing started campaign to "clean out" expatriates illegally living or working in Chinese capital

There are almost 200,000 foreign residents in Beijing on short-term or long-term visas

Chinese citizens an call a telephone hotline to report "suspicious foreigners"

Analysts wonder whether this is a measure to ensure stability before leadership change

"Does this mean I must now carry my passport everyday?" my wife Ana wondered aloud with a mix of bemusement and exasperation.

She was reacting to news reports that Beijing had started a 100-day campaign to "clean out" expatriates illegally living or working in the Chinese capital.

Until the end of August the Beijing Public Security Bureau has decreed that all resident foreigners are expected to show their passports for "spot checks" of visas and resident permits.

Hinting at stern measures for violators, a campaign poster features an image of a giant fist.

Police have conducted a sweep of communities where expatriates frequently congregate, like the university belt and the Sanlitun district of the city, which boasts an eclectic array of shops, restaurants and bars.

But finding violators may not be easy. There are almost 200,000 foreign residents in Beijing on short-term or long-term visas, according to the Beijing Morning Post, which quotes police sources.

JUST WATCHED Chinese using Web for political satire Replay More Videos ... MUST WATCH Chinese using Web for political satire 02:34

JUST WATCHED Activist case exposes China crackdown Replay More Videos ... MUST WATCH Activist case exposes China crackdown 02:24

JUST WATCHED Turmoil and intrigue bubble in China Replay More Videos ... MUST WATCH Turmoil and intrigue bubble in China 03:18

The campaign has enlisted the help of the Chinese public, who can call a telephone hotline to report "suspicious foreigners." Violators will be fined, detained or even deported.

However, the crackdown has made the expat community in Beijing uneasy, with many wondering why the authorities have decided to take action now.

China watchers wonder whether this is simply a preemptive measure to ensure security and stability months before the Communist Party hold its once-a-decade leadership transition later this year. A similar sweep was conducted several months before Beijing hosted the 2008 Summer Olympics.

Others see the high profile campaign as yet another hint of the xenophobic tendencies in the "Middle Kingdom."

Days before the police campaign commenced, shocking videos purportedly showing a British national sexually abusing a Chinese woman went viral on cyberspace. It prompted an avalanche of angry posts on social-networking sites.

Soon after the campaign was announced, Chinese TV anchor Yang Rui poured gasoline onto the fire when he posted scornful comments on his microblog calling for the expulsion of "foreign scum."

Some observers say China has good reason to go after law-breaking foreigners. "The crackdown makes sense in the light of the large number of illegal migrants that have made it into China, some of whom may have been involved in illegal or violent activities," said David Zweig, a professor at Hong Kong University's Department of Science and Technology.

But he said foreigners should be treated fairly and equally, according to law.

Crucially, the crackdown seems to be popular with many ordinary Chinese.

"Of course we should send home those foreigners who have entered illegally, just as we Chinese won't be allowed in other countries without legal documents," one Beijing resident told CNN.

"To be a strong nation, you need not just a good economy but also strong diplomatic policies," said another. "That shows a nation's self-respect and dignity."

Another resident was more blunt: "China as a big nation should get tougher. We've been too soft for too long."

As China's economic and military might grow, the people's pride and nationalistic feelings rise.

There's nothing wrong with promoting patriotism, experts say, but they warn against chauvinism. "The Chinese have to be careful about underlying chauvinism which can lead them to behave inappropriately towards foreigners in the country, and in their foreign policy," said Zweig.

During the last century, China experienced how nationalism led to xenophobia during the Boxer Rebellion in the early 1900s -- when groups of peasants banded together to rid the country of foreign influences -- and the Cultural Revolution (1966-76), when Mao Zedong attempted to reassert revolutionary values in China by purging what he described as bourgeois influences.

No one wants to experience xenophobia. I have seen how ugly it can be.

Like most foreigners who lived in China in the 1970s, I saw a closed, xenophobic society riddled with ingrained racial stereotypes. Foreigners in Beijing were virtually quarantined.

While we enjoyed special privileges, such as access to special "friendship stores", train compartments, hospital wards and beach resorts, we were cut off from spontaneous contact with ordinary people. Diplomats and journalists were segregated in gated "foreigners' compounds", which we use to call foreign ghettos.

Local residents resented such special treatment. They often targeted foreigners with scorn and disdain. Foreigners were disparagingly referred "waiguo guizi" (foreign devils).

Although infrequent, I do remember an anti-foreign backlash that led to occasional altercations and even rioting.

To be sure, China has changed significantly since Deng Xiaoping launched his market reform and open-door policies in 1978. Over the years it has gradually integrated into the global village through diplomacy, trade, tourism, academic exchanges and the media.

But some expatriates in Beijing still detect anti-foreign tendencies. "I find it difficult to understand why resentment is aimed at foreigners in general rather than at those who break the law or behave badly, regardless of nationality," said one.

"There is definitely an issue of Chinese having stereotypical views on foreigners, and a very clear us-versus-them attitude," said another. Neither person wished to be identified.

China scholars believe many Chinese still harbor racist tendencies and lack the open-minded tradition of self-reflection when they feel or express such views. "This lack of self-reflection," Zweig opined, "allows for anti-foreignism to lurk under the surface."

That partly explains why, in its long and checkered history, China has capriciously swung from a sentimental love-affair with things foreign to angry rejection -- and back again.

Is xenophobia rearing its head again?

"This is not xenophobia," a recent China Daily editorial stated. "It is people's desire to live in a civilized society. Our government is under an obligation to make sure citizens live in a law-abiding country. The ongoing action against illegal immigration in no way compromises our hospitality to foreign guests."

That is the kind of reassurance that expatriates in China badly need.