(Repeats story that moved at 0500 GMT)
By Ben Blanchard
RUILI, China, Jan 25 (Reuters) - The giant red poster staring over China's Wanding border crossing with Myanmar proclaims that their "brotherly feelings will last forever".
A few kilometres (miles) away, just outside the dusty frontier town of Ruili, a border village proudly tells its few visitors that Myanmar chickens cross over the rickety bamboo fence to lay their eggs in China.
But behind the bonhomie and poems of friendship, China's relationship with its impoverished southeastern neighbour and erstwhile ally formerly known as Burma is deeply troubled.
This was bought sharply into relief last August when Myanmar's military overwhelmed and disarmed the Kokang rebel group, triggering an exodus of more than 37,000 refugees into China, prompting an unusual outburst of anger from Beijing.
"I wouldn't characterise them as friends, in the way Britain and America or Australia and New Zealand could be regarded as friends. It's often a tense and difficult relationship," said Ian Storey, a fellow at Singapore's Institute of Southeast Asian Studies.
"It's basically a marriage of convenience. The Burmese rely on China for money and armaments, and China uses its position at the U.N. Security Council to protect Burma to some extent, in return for which China gets access to the country's natural resources, and it gets a voice in ASEAN," he added.
In 1997, despite fervent U.S. and EU opposition, Myanmar joined the Association of Southeast Asian Nations, set up in 1967 as a bulwark against the spread of Communism in the region.
Logic may dictate that Myanmar and the generals who have run it for the last five decades or so would give unquestioning support to China.
China backed Myanmar following the bloody suppression of pro-democracy protests in then-capital Yangon, once called Rangoon, in 1988, and has continued to stand by the junta and sell them arms in the face of sweeping international sanctions.
In 2006, during a visit to China's southwest Yunnan province which shares a long border with Myanmar, Myanmar's Commerce Minister Tin Naing Thein thanked Beijing for being a "good neighbour" and offering "vigorous support" after the 1988 events.
Yet profound suspicion of China in Myanmar, which dates back to before independence from the British in 1948, has not changed despite Beijing's overt support in the past 20 years or so.
For years, China backed the Communist Party of Burma's armed struggle against the Myanmar government.
"Chinese soldiers wore Burmese Communist military uniform and they participated in actual battles against the Burmese armed forces," said Maung Zarni, a Myanmar expert at the London School of Economics' Centre for the Study of Global Governance.
"The current leadership is made up of people who cut their teeth in the anti-communist/anti-Beijing operations in the 1950s and 1960s. It's difficult to conceive of change of heart on behalf of the Burmese generals towards Beijing."
FEAR OF UNREST
China's fear is that the kind of unrest seen last August in Kokang will be repeated with any one of a number of different ethnic rebel militias, and spill into its territory again.
The threat is especially acute as the generals gear up for an election sometime this year -- a ballot rights groups call a sham -- by trying to get rebel groups along the border to cooperate, by force if necessary.
The problem for China is most acute in Yunnan, where the long and in places remote frontier is porous, and ethnic minorities on both sides share close blood ties.
Activists say that Myanmar's army is preparing for another offensive against these rebels, including the 30,000-strong ethnic Chinese United Wa State Army (UWSA), denounced as a narcotics cartel by the United States.
That worries China, not only because of the potential for more refugees, but because, simply stated, instability on the border is bad for business.
"Anything that causes the border to shut we of course do not welcome," said Chinese jade trader Lin Mingqi, sitting in his shop stuffed full of jade bracelets, Buddhas and charms made from Burmese jade and overlooking Ruili's border post.
"We're here to do business. We don't want to have to worry about politics."
Already drugs flow easily from Myanmar into China, fuelling an AIDS epidemic in Yunnan driven by the sharing of dirty needles, as well as prostitution.
Yet Myanmar is very good at hedging its bets, playing off friend and foe alike to ensure the survival of the regime.
Luo Shengrong and Wang Aiping, two academics at Yunnan University, wrote in last month's Chinese journal Contemporary International Relations that the Kokang attack was deliberately designed to tell Beijing not to take relations for granted.
"It was done to show the West that Myanmar's military government is adjusting its foreign policy, from just facing China to starting to have frequent contact with the United States, India and other large nations, to have a balanced foreign policy," they wrote.
"(The attack) also seemed to be showing that they were reducing their reliance on China."
They noted that the operation could be construed as Myanmar trying to curry favour with the United States, by showing Washington what a useful ally Myanmar could be against China, a country viewed with mistrust by many on Capitol Hill.
The academics noted that as a "reward" for the Kokang operation, Washington lifted a visa ban on Myanmar officials to let Prime Minister Thein Sein address the United Nations in New York.
While it is hard to pinpoint exactly what Myanmar's secretive government hoped to achieve more broadly with the Kokang move, the academics' comments are a reflection of Chinese suspicion as to what their supposed friend is up to.
The neighbours have significant business ties. Bilateral trade grew more than one-quarter in 2008 to about $2.63 billion.
In late October, China's CNPC started building a crude oil port in Myanmar, part of a pipeline project aimed at cutting out the long detour oil cargoes take through the congested and strategically vulnerable Malacca Strait.
RIVALRY
For China, any discomfort at its friendship with Myanmar may also be outweighed by another strategic consideration -- India.
While relations may have improved considerably with New Delhi since the brief border war in 1962 that poisoned ties for decades, China is a strong supporter of India's traditional enemy Pakistan.
"From China's perspective, having a close relationship with Burma gives it an additional pressure point on India because it has good relations with Pakistan and increasingly with Nepal and also with Bangladesh," said Singapore-based Storey.
"If you were sitting in New Delhi, you may see that as a policy of encircling India with friends of China."
Myanmar's wily generals realise this, and see being friends with India as an import foil to China.
"If you look at the patterns of their foreign relations, they're constantly playing one off the other. If it's not China and the U.S., it's China and India. It's a very simple but effective strategy, to keep everyone coming after you," said David Mathieson, Myanmar researcher for New York-based Human Rights Watch.
"You always see things balanced out. Say the Chinese come one month, and then the Indians comes the next, or a senior Burmese official goes to Delhi. It's just them being prudent, saying 'we don't have friends, we just have partners'."
(Editing by Megan Goldin)