If you ask Xu Peifen what she thinks of Beijingers, she puffs out her chest and squares her shoulders, doing the best imitation of a pompous bureaucrat that can be mustered by a plump, middle-aged woman standing in the kitchen with an apron tied around her.
"They stand like this," says the 56-year-old restaurateur, hands on hips, adding a scowl to her performance. "They're sooo annoying. Just because they come from the capital, they act like they're running the country."
The antipathy is mutual. "Shanghai people are selfish," retorts Ge Ding, a 28-year-old Beijing-born teacher who moved to Shanghai for work in 2001. "Even the people my age, all they talk about are material things, their clothes, the stock market. All they care for is themselves and money."
The trash talk between the natives of Beijing and Shanghai has been going on for decades, with the rest of China ducking the crossfire.
In China, it is the great rivalry, similar in some ways to New York versus Los Angeles. The dynamic is a powerful undercurrent in Chinese politics and culture.
Beijing's upper hand as China's capital was boosted by the 2008 Summer Olympics, which occasioned a $45-billion makeover and brought the city the world's attention, along with 1 million visitors.
Shanghainese sat sullen through the festivities. ("They weren't really cheering," is how Ge put it.)
But the zeitgeist of 2010 has been all about Shanghai, all decked out and refurbished for the World Expo, which runs through Oct. 31.
Not to be outdone, Shanghai spent nearly $60 billion on the expo and improvements to infrastructure. The statistics are impressive: Shanghai built eight new subway lines, bringing its total to 11 lines with 246 miles of track. (Beijing has eight lines over 120 miles.) Beijing brought in 3,000 portable toilets for the Olympics; Shanghai, 8,000 for the expo. Both Shanghai and Beijing built new airport terminals.
Shanghai got better marks for modernizing without destroying too much of the city's original character. In renovating its Bund area, shunting cars underground and removing an ugly flyover, Shanghai's planners were praised for restoring a riverfront quay to its 1930s glory; Beijing took flak for bulldozing many of its hutongs, the quaint alleys in the historic center.
Once running neck and neck as a tourist destination, Shanghai pulled way ahead this year, with more than 70 million people expected to visit the expo before its six-month run ends. The tourists are mostly Chinese, and many were getting their first glimpse of Shanghai.
"Wow. Shanghai is so beautiful, so developed and international, up to a Western standard," said 23-year-old student Liu Yue, who was in line to see an exhibit on Shanghai at the expo with her school friends.
As for the people, she said, "Well, the young ones are friendlier than the old."
The Shanghainese have a reputation for snobbery, and Chinese often complain that they feel shut out in Shanghai, perhaps because the dialect is almost incomprehensible to Mandarin speakers.
At the same time, the city is thought to be more foreigner-friendly, the most famous example from its history being its acceptance of 30,000 Jewish refugees during World War II.
Although the colonial days are long gone, the neighborhoods of the old French, Russian, American and British concessions still contain enough of the Art Deco and neoclassical styles to give the city a touch of whimsy.
Few would deny that Shanghai is the more fashionable city.
"The Shanghai men dress better than the Beijing women," said Liu Heungshing, a photographer who lives in Beijing. On the other hand, "if you walk out your door in Beijing, you have a much better chance of bumping into somebody with whom you can have an intellectual conversation."
Beijing has the top universities, the culture, the grandeur and history, the palaces of Qing emperors past and Communist Party chieftains present. The city is girded with ring roads and bisected by a grand, wide boulevard, wide enough, critics would point out, to deploy a column of tanks, as happened in 1989 when pro-democracy demonstrations were put down.
"Beijing is a male city, Shanghai is a female city," is how Zhu Xueqin, a professor at Shanghai University and one of the city's best-known public intellectuals, once put it.
Lu Ming, a Shanghai-born businessman who now lives in Beijing, characterized the difference this way: "In Shanghai, people stand in line waiting for the bus. In Beijing, if you drive a Mercedes-Benz, you can run over people with impunity."
Beijingers and Shanghainese love to poke fun at each other, though the jokes are often more barbed than funny. Shanghai men are reputed to be vicious in business — hence the term shanghaied — but wimps at home. "At home, they do the dishes, take out the trash and give their wife/mistress a neck rub after the hard day she put in shopping," wrote one blogger on a site called China Forum.
To the Shanghainese, the Beijingers — and all northerners, for that matter — are peasants.
"They smell like garlic," said restaurateur Xu, voicing a popular refrain. "We Shanghai people keep ourselves and our homes very clean. We are more refined. We drink coffee. They only drink tea."
Strands of the personal and the political, often hard to separate, are intertwined in the resentment felt by Shanghainese. Beijing at once embodies northern culture and symbolizes the central government. After the communist victory in 1949, Shanghai's cultural predominance was eclipsed by Beijing's. The city remained, however, the financial capital. Through the 1980s, it paid a staggering share of China's total tax revenue, by some estimates, 70%.
Although former Chinese President Jiang Zemin served as Shanghai's mayor and party secretary, the influence of the so-called Shanghai clique has been eclipsed since Hu Jintao became president in 2003. Then Chen Liangyu, a later Shanghai party secretary, was ousted on corruption charges and replaced on the Politburo by Xi Jinping, the current favorite to succeed Hu as president.
Although Shanghai, with more than 19 million people, remains China's largest city in terms of population, businessman Lu doesn't see it regaining its edge over Beijing.
"Shanghai has become a really beautiful city again with the expo, but the center of power is Beijing," Lu said. "You drive up and down the ring roads of Beijing and you see the headquarters of the companies — Petrochina, China Mobile.... It is the nature of this form of government."
Researcher Nicole Liu in The Times' Beijing Bureau and Times staff writer Mark Magnier contributed to this report.