China’s anxieties about India are colored to an extent by widespread stereotyping. People here often invoke India as an example for why China, with its even larger population, is not ready for democracy.

Some call Indians “a-san,” a derogatory term that was once used to refer to the Sikh guards who worked in Shanghai’s British settlement in the late 19th and early 20th centuries. In more recent years, the public perception of India has largely been shaped by Chinese state media, which tends to highlight stories on India’s caste system and the treatment of women in Indian society.

At times, those state media reports have taken on blatantly racist overtones. In August, Xinhua, the official news agency, released a short video exhorting India to retreat from the continuing standoff at the Sikkim border. The three-minute clip featured someone wearing a turban and a fake beard in an apparent attempt to mock Sikhs, who make up a religious minority in India.

Experts say that underpinning such views is a belief widely shared among Chinese that while India may be a regional force to be reckoned with, it also lags behind China in terms of development. According to a survey by the Pew Research Center published last year, just 26 percent of Chinese hold a favorable view of India, down from 33 percent in 2006. (The feeling is apparently mutual: Another Pew Research Center survey from last year showed that just 31 percent of Indians view China favorably.)

Even today, the word that most often comes up in discussions about India is luan — or chaos.

“There’s a perception among Chinese that India is dirty and unsafe,” said Tansen Sen, a history professor at New York University Shanghai. “Even though Indian movies have been popular, Chinese tourists still don’t go to India. They would rather go to Sri Lanka or Nepal.”

Indians, for their part, are also less than enthusiastic about China. Ever since 1962, when the two countries engaged in a brief but bloody border war, India has been highly suspicious of China and its intentions.