MADAY ISLAND, Myanmar -- The pipelines are finished. The oil storage tanks gleam in the tropical sun. The deep-sea port set in jade-colored waters awaits the first ships bearing crude from the Middle East.
China's ambition of transporting energy through the Indian Ocean and across the mountains of Myanmar seems close to fulfillment. Natural gas is scheduled to start flowing in July from wells deep in the Bay of Bengal through a 500-mile pipeline. Oil will run in a parallel pipe at the end of the year.
But for China, the cost of the pipelines has been far greater than the several billion dollars that the China National Petroleum Corporation, China's energy giant, has spent on construction. With its projects challenged more than ever by activists energized by Myanmar's democratic opening, China has been trying to repair its tarnished reputation among residents here, and in the country at large.
Farmers and fishermen in this remote coastal region -- who made little headway while objecting to lost lands and diminished catches under Myanmar's repressive military junta -- are winning some concessions. In central Myanmar, monks have joined with ancestral landholders to stop a Chinese-led conglomerate from leveling a fabled mountain embedded with copper.
And last week, in a new ominous sign for the Chinese, guerrillas of the Shan State Army attacked a compound belonging to the Myanmar Oil and Gas Enterprise, a partner with the Chinese oil company, not far from the pipeline and close to China's border.
In response to the broad opposition, Beijing has ordered secretive state-owned Chinese companies to do something they have rarely done before: publicly embrace Western-style corporate social responsibility practices and act humbly toward the people who live near their vaunted projects.
The grass-roots protests against Chinese projects disturb Beijing because they come amid a scramble for influence in Myanmar between China and the United States.
Official visits give a glimpse of the diplomatic jockeying. President Thein Sein of Myanmar, who heads the quasi-civilian government, will visit the White House on Monday in what will be the first encounter in Washington between an American president and a leader of the country formerly known as Burma, since 1966.
A member of the military junta that China backed for decades, Mr. Thein Sein met President Obama in November during what was the first visit by a sitting American president to Myanmar. Mr. Thein Sein has visited China twice in the past six months. The leader of the opposition, Daw Aung San Suu Kyi, was at the White House earlier this year and is expected in Beijing soon.
"It is in China's self interest to think about the impact of their investments," said Thant Myint-U, a Myanmar historian and author of "Where China Meets India: Burma and the New Crossroads of Asia." "In the long term, it is difficult to see a Myanmar where China is not important. But there is a chance that China will no longer be the dominant actor in Myanmar, and that is worrying for some people in China."
That concern has prompted Chinese officials, worried about losing Myanmar to the Americans, to push back. When a veteran Chinese diplomat, Wang Yingfan, was appointed several months ago as special envoy to Myanmar, he immediately flew there and spoke about the social obligations of Chinese state-run corporations.
And Gao Mingbo, the head of the political section at the Chinese Embassy in Yangon, said: "The companies must retain the support of the local communities. That has been the consistent message of the embassy: to be open, to be engaged."
He created the embassy's Facebook page; although Facebook is blocked in China, it is a tool that Chinese officials in Yangon, Myanmar's commercial capital and main city, are using to reach citizens.
"If you don't walk the walk and just talk the talk, you won't win the hearts and minds of the local people," Mr. Gao said.
Whether China's outreach efforts will quell anti-China protests is an open question.
After years in exile in Thailand, the leadership of activist organizations like the Shwe Gas Movement has now regrouped at home, its ground forces well trained in tactics of persuasion and protest. The group has pledged to continue to press for higher compensation for land taken for the pipelines, and to push for better-paying jobs along the pipelines' route. These are demands similar to those made by nongovernmental groups in China but given short shrift by Chinese authorities.
Hundreds of miles east of the pipeline, the Wanbao Mining Corporation, a subsidiary of China's state-owned arms maker, Norinco, is collaborating with Myanmar Economic Holdings Ltd. to build a vast new pit for the mining of copper, a project that calls for the acquisition of the lands of 26 villages at the base of Letpadaung mountain.
After violent protests against the mine last November, during which human rights groups say the police used white phosphorous smoke grenades, the government established an inquiry led by Ms. Aung San Suu Kyi.
To the relief of Wanbao, the inquiry ruled that the company could continue to expand, and Ms. Aung San Suu Kyi, anxious not to alienate China, urged the farmers to cooperate with the project. Her inquiry ordered the company to pay market prices for farmers' land, and compensation for three years of crops.
The report said that the company must conduct an environmental impact study but mentioned nothing about enforcing the results.
Passions are high among the farmers near the mine, many of whom have been trained by former student activists known as the 88 Generation Group. At the village of Wat Mie, a 27-year-old woman, San San Hla, recently sat on the dusty orange earth sorting watercress leaves, plucking the good ones and discarding the others in preparation for selling at the market.
In the distance, the tin roofs of new houses built by the mining company for farmers who agreed to sell their land glinted in the setting sun. Ms. Hla said there was no way she could be persuaded to move into the company-provided compound.
"I'm not afraid of the mining company," said Ms. Hla, who was arrested during the protest last year. "I won't move, because I like this farming life." She will ignore Ms. Aung San Suu Kyi's pleas for cooperation with the Chinese company, she said.
Immediately after the release of the inquiry's results, Wanbao appointed a public relations officer, Aung Zawlin, who proudly showed visitors his PowerPoint presentation outlining plans for new schools, libraries and upgraded roads around the mine.
China National Petroleum Corporation's public relations team recently released a 42-page document outlining community outreach, which the company says includes $20 million worth of schools, clinics and other projects. Many of the company structures appear sturdier than the run-down government facilities in the villages along the pipeline. But villagers complain of no money for teachers.
Leading the opposition to the petroleum corporation is Wong Aung, the international coordinator of the Shwe Gas Movement, who was born in Rakhine State, an area that encompasses Maday Island, where the gas and oil pipelines begin their journey. "The exiles were encouraged to come back to put more pressure on the Chinese companies," said Mr. Wong, who is running workshops for villagers on how to organize.
The fact that the pipeline will provide power to Yunnan Province, in the far southwest of China, but leave Rakhine still largely in the dark galls the villagers, who use wood for cooking and candles for light.
As the finishing touches were being made to the oil storage tanks, several hundred men and women from tiny Piyin Village in the center of Maday Island protested last month, demanding additional compensation for their lands.
The company agreed to more money for land, new roads and extra electricity.
Still, the resentment remains. Maung Maung Gyi, 52, a physics teacher in nearby Kyaukphyu, said: "The Chinese come here for their own benefit and then leave us with only small things."
Wai Moe contributed reporting.world
This article originally appeared in The New York Times.