“ANYTHING Xi can do, I can do better,” seemed to be the mantra of Narendra Modi, India’s prime minister, as he toured America in late September, hot on the heels of China’s president, Xi Jinping. Both started on the west coast, seeking to charm the bosses of technology firms: both made speeches at the United Nations; and both met President Barack Obama. Above all, both sought to burnish their images with their own people at home and with Americans. Mr Modi perhaps wanted to show America how important a friend he can be; Mr Xi to prove that he is not yet an enemy. By those criteria, Mr Modi had the more successful American journey. But it also served as a reminder of how far India lags China in global clout.

Mr Modi’s tour was tacked on to his attendance at the UN’s summit on sustainable development. By contrast, Mr Xi’s was much the grander affair. He was making his first formal state visit, with the full panoply of White House pomp. China’s official press compared its importance to the famous goodwill tour made by Deng Xiaoping in 1979, the first visit by a Chinese leader after the two countries established diplomatic relations. The same press also tried hard to present a cuddly image of Mr Xi, after the bad publicity China has received under his rule for its bullying of neighbours and its worsening repression at home. The People’s Daily, the Communist Party mouthpiece, produced a video of foreign students in China gushing about “Uncle Xi”: “wise and resolute”, “handsome”, “super-charismatic”, “a little bit cute”, “Winnie the Pooh”, etc, etc. It appeared not to be a joke.

Perhaps recalling the splash Deng made by donning a ten-gallon hat, Mr Xi went out of his way to embrace American culture. As is his habit on foreign trips, in a speech to business leaders he reeled off a reading list of notable national authors, adding a personal touch by recalling how he once had a mojito at a bar in Cuba frequented by Ernest Hemingway. Unusually, he even noted reports of a power struggle at the top of the Communist Party, if only to deny them by reference to “House of Cards”, an American television series about political skulduggery in Washington.

During his visit Mr Xi also said many of the things his hosts wanted to hear. He said he opposed Chinese cyber-theft from American firms. He respected the freedom of navigation in the South China Sea and said China would not turn the artificial islands it has built there into military bases. He was committed to economic reform and rejected any further devaluation of the yuan. And he said China was determined to do its bit to combat climate change, on which he and Mr Obama issued a fresh joint statement following one they agreed on in Beijing a year ago. Meanwhile, on the eve of the state visit the two countries’ defence ministries signed an agreement elaborating their procedures for avoiding accidental clashes between military aircraft.

Yet despite all these demonstrations of a flourishing bilateral relationship Mr Xi failed to dispel American mistrust. After all, the apparent rapport he and Mr Obama established at their informal summit in California in 2013 led to no moderation in Chinese behaviour in the South China Sea or over cyber-security. On the contrary, in American eyes, China has grown more aggressive on both counts.

Of course, similar mistrust might be appropriate for Mr Modi’s promises to turn India into a business-friendly, wired economy free of red tape. In America Mr Modi, like Mr Xi, had to counter impressions that his early zeal for economic reform had run into the sands of vested interests and institutional inertia. And unlike the Western-suited Mr Xi, with his glamorous wife in tow and banging on about his bookshelves stuffed with Mark Twain and Thomas Paine, Mr Modi is not a man you could share a chicken bucket and a beer with. He is, well, un-American—favouring Indian clothes, celibate, teetotal, vegetarian and with a political history that, a decade ago, meant he was refused an American visa. Moreover, intense American efforts over the past decade to deepen relations with India are constantly frustrated by wrangling over nitty-gritty irritations—in creating a commercial-liability regime that will allow American firms to get involved in India’s nuclear-power industry, over visas for an army of Indian software engineers in Silicon Valley, and in finalising an investment treaty.

It’s hard, being a soft power

Yet in the contest for popularity in America Mr Modi is beating Mr Xi hands down. He makes full use of three big advantages. First, he is a politician who has risen through a democratic system, with all the skills getting elected requires, including a willingness to flaunt emotions in public. He and Mr Obama greet each other with bear hugs. It is hard to imagine Mr Xi in such a clinch, or weeping as Mr Modi did when in a public forum he told Mark Zuckerberg, the founder of Facebook, about his mother. Second, Mr Modi enjoys the support of a large and influential community of Indian-Americans, enthusiastic lobbyists for India. It is almost impossible to imagine Mr Xi working similar crowds of Chinese-Americans. It is not just that many Chinese in America have chosen not to live under communist rule; to show enthusiasm for the party’s leaders would be to be excoriated as a fifth column. Lastly, India is not China. The more China appears a threat to American interests, the more important India appears as a counterbalance. The bigger the worries about China’s economy, the more hopes are invested in India’s.