HE WILL be on the ground for less than a day. Still, when Barack Obama arrives in Myanmar on November 19th, one leg of a three-country South-East Asian tour, it will be quite a moment: the first ever visit to the country by a sitting American president, which sets the seal on one of the fastest rehabilitations of a former American foe.

Not that long ago America was branding Myanmar an “outpost of tyranny”, and an “unusual and extraordinary threat to the national security and foreign policy of the United States”. But that was before Aung San Suu Kyi was released from years of house arrest in late 2010 and, the following year, the new president, Thein Sein, promised to take his country down the path of opening and reform. These days, it is all friendliness between the two sides. Yet the fact that only a couple of months ago Mr Thein Sein’s name had hastily to be removed from a long-standing visa blacklist in order to meet his new friends in the Obama administration in New York shows how swiftly events have moved.

Too swift, for some. Mr Obama says he is going to Myanmar in order to reward the regime for the democratic changes of the past two years, and to encourage further reform. Some activists and Burmese exiles are critical of his rush. They acknowledge Myanmar’s progress to date, but argue that it is premature for an American president to confer the honour of a visit on a regime that still holds political prisoners and prosecutes nasty little wars against its own people, such as the ethnic Kachin.

Then there is the more recent outbreak of sectarian violence in Rakhine state in the country’s west, the brunt of which is borne by the Muslim Rohingya minority. Since fighting erupted in June the conflict has cost hundreds of lives and left over 130,000 homeless. The inability—or unwillingness—of the government to stem the attacks on the Rohingya, a stateless people though most have lived in the country for generations, has raised doubts as to whether the regime is really changing its spots with respect to human rights and the ethnic divisions within the country.

Similar concerns animate complaints about another leg of Mr Obama’s brief tour, to Cambodia. He will be in Phnom Penh on November 19th and 20th to attend the annual East Asia Summit. But many, including both Republican and Democratic congressmen, question the wisdom of appearing too close to the country’s strongman, Hun Sen, who has ruled with an iron fist for almost three decades (see Banyan). Only in Thailand, which he also visits, will Mr Obama court less controversy.

Trumping the concerns, however, is America’s “pivot” towards Asia and the geopolitical contest for friends and influence in the face of a rising China. Myanmar, which shares a 2,000-kilometre (1,250-mile) border with China, is viewed as a crucial prize in this contest. Mr Obama hotfooting it to Myanmar throws out an unequivocal message of American intent.

The visit will also be used to justify the more conciliatory foreign policy that he promised in his inauguration speech in January 2009, following his bellicose predecessor, George W. Bush. Then, Mr Obama offered to extend a hand to pariah regimes that were “willing to unclench” their fists. The policy yielded little in North Korea and Iran, but at least Mr Obama has a sweaty palm to clasp in Myanmar.

Before, America had focused on isolating the military regime with comprehensive economic sanctions, introduced after the repression of the democracy movement in the early 1990s and the house arrest of its leader, Miss Suu Kyi. The Obama administration promised to uphold the sanctions but also to talk directly to the Burmese leadership, with the blessing of Miss Suu Kyi.

This “pragmatic engagement” has undoubtedly yielded results. American visits and offers of help have been matched by concessions by the regime: prisoner releases (another occurred just before Mr Obama’s arrival), free and fair by-elections, the relaxation of media censorship. The pace of change quickened after the visit of the secretary of state, Hillary Clinton, late last year. Importantly for America, Mr Thein Sein has renounced military links with North Korea.

It helped that Myanmar’s ruling generals really wanted to engage. Their pariah status in the West, and a decrepit economy, were immense humiliations when rubbing shoulders with fellow South-East Asians. They also wanted to end their growing reliance on China. As Americans realised that sanctions had simply driven Myanmar into China’s arms, so the generals increasingly resented the embrace. Chinese businesses were coming to dominate, especially in Myanmar’s north, which the Chinese were tearing up to make way for unpopular development projects. And so both America and Myanmar had good reasons to help each other.

As the United States seeks to deepen ties in the neighbourhood, China, for its part, has been strangely quiet about Myanmar’s reorientation towards the West. Perhaps that is because the country is important to China above all for future transhipments of gas, the plans for which are still going ahead, with a pipeline under construction. As for Miss Suu Kyi, many Chinese hardly know about her. But as she rises to prominence that will change. Her anglophile tendencies, and a late husband who cared passionately about preserving Tibetan culture, will do nothing to allay growing Chinese suspicions of her.

Meanwhile, foreign-policy experts in China refuse to be taken in by all the American rhetoric about democracy and human rights. America, complains Zhu Feng, an international-relations specialist at Peking University, always had a strategic concern with China in the region, assuming that it wants to use “Myanmar as a springboard to the Indian Ocean”. (That is a not unreasonable assumption.)

And so the Obama visit is likely only to deepen the Chinese feeling of creeping encirclement. Chinese experts also point to last month’s extraordinary announcement that next year the Burmese army will, as observers, probably attend America’s annual regional military exercises with its friends, known as Cobra Gold. This year’s event, in Thailand, included contingents from South Korea, Indonesia, Japan and Singapore. If the Burmese join this lot, then expect the more conspiratorial readings of the “pivot” to get a really good airing in the Chinese capital.