CHINA’S BACK YARD | This is part of an occasional series examining China’s efforts to win friends and clients in Asia and to assert a more dominant role across the continent.

Men fish in Dong Da Lake this fall under pillars for a half-finished urban railway. The Chinese-built project is running three years behind schedule and 57 percent over budget. (Quinn Ryan Mattingly/For The Washington Post)

To win friends and open new markets for Chinese companies, Beijing is offering its Asian neighbors tens of billions of dollars in loans and investment. But in Vietnam, the effort is falling flat.

China’s aggressive assertion of its maritime territorial claims has alienated many here, and President Xi Jinping’s grand vision of a new Silk Road with China at its center is greeted with scorn and suspicion rather than excitement.

The relationship has turned so bad that Vietnam’s Communist Party is tilting more and more toward an old enemy, the United States. And when Xi paid a state visit to Vietnam last month, you could almost feel the chill.

Xi was feted with a 21-gun salute and granted a rare invitation to address the country’s National Assembly. His 20-minute speech to his “comrades” in Vietnam was full of poetic references to the two nations’ shared destinies, to how brothers can even “break gold” if their hearts are united.

But Xi’s exhortations were met with stony silence and only a smattering of applause at the end. Boredom, indifference and even hostility were written on the faces of his audience.

“The atmosphere was very tense,” said one Vietnamese official, who spoke on the condition of anonymity because of the sensitivity of the issue.

China wants to help its fellow Asian countries build the infrastructure their economies desperately need, under the banner of re-creating ancient Silk Road trade routes and partly channeled through a new Asian Infrastructure Investment Bank. Vietnam needs the money but fears a hidden agenda.

“We are quite suspicious because we don’t know the real objective,” said Tran Truong Thuy, an expert at the Diplomatic Academy of Vietnam, a Foreign Ministry think tank. “Behind its Maritime Silk Road, China can advance its sovereignty propaganda.”

In the run-up to Xi’s visit, activists staged several small but rare protests against him, watched but not always disbanded by local police. Eight Vietnamese nongovernmental organizations and 1,700 activists signed an online petition against his trip, while a Facebook campaign gathered thousands more to the cause.

In a subtle snub, Xi’s visit was timed to coincide with a visit by the Japanese defense minister, with Hanoi inviting a Japanese warship to dock at Vietnam’s strategic Cam Ranh Bay.

The contrast between Xi’s visit and President Bill Clinton’s 2000 trip to Vietnam was stark: Then, tens of thousands of young people waited late into the night to welcome the first U.S. leader to visit since the Vietnam War ended.

For Xi, there were no cheering crowds.

Railway woes

On the streets of Hanoi, a series of concrete pillars and a half-built elevated railway hint at one of the reasons China faces so much public distrust here.

A Chinese-built urban rail project is running three years behind schedule and 57 percent over budget. Several accidents, including scaffolding collapses and falling objects, have killed or injured passersby, while Vietnam’s transport minister has complained that the terms of the Chinese loan forced him to buy Chinese trains.

“Chinese contractors are very bad,” Minister Dinh La Thang said, according to local media outlets. “I wanted to replace them many times, but I could not because of the loan agreement’s obligations.”

China has a reputation for transferring outdated technology to Vietnam, producing low-quality workmanship, ignoring environmental standards and importing its own workers. Chinese companies often win contracts by bidding at unrealistically low rates, experts said, only to end up charging more.

“How can they bid with such low prices?” asked Tran Viet Thai, another expert at the Diplomatic Academy of Vietnam. “It is because of corruption and bribes. China can help with some infrastructure projects, but where does the benefit go? It goes into the hands of some corrupt officials.”

Partly as a result, in 2013 Vietnam tightened the rules governing the awarding of public contracts, stipulating, for example, that foreign workers be kept to a minimum.

It has joined the Asian Infrastructure Investment Bank but has kept its distance from the Silk Road plan.

But the most dramatic recent break in the relationship between Beijing and Hanoi came in May 2014, when China towed a $1 billion oil rig close to the Paracel Islands, in South China Sea waters that Vietnam considers part of its exclusive economic zone.

Luu Hoai Thu, a receptionist for the Cat Linh-Ha Dong railway project’s management board, walks by a model rail car that was on display this fall for public introduction and feedback. (Quinn Ryan Mattingly/For The Washington Post)

Coming at a time when relations between the two countries were on an upswing, “the oil rig incident was a shock to Vietnam,” the Vietnamese official said. “Mutual trust has not really recovered.”

Deadly riots broke out in Vietnam in which Chinese and Taiwanese factories were attacked. There was a call for an emergency meeting of the Communist Party’s Central Committee to discuss forming an alliance with the United States — a radical strategic change for a country whose disdain for military partnerships is a central foreign policy tenet, said Carl Thayer, a Vietnam expert at the University of New South Wales. President Obama’s top adviser for Asia, Evan Medeiros, was even invited to Vietnam that July to discuss deepening ties.

Rethinking relationships

In the end, China withdrew the oil rig in July 2014, a month ahead of schedule, and the emergency meeting of the Central Committee was never held. Nevertheless, an improving relationship with the United States received further impetus.

“China’s actions sparked a big internal debate in Vietnam about its strategic orientation,” said Medeiros, now a managing director with the Eurasia Group, an international business consultancy.

In the past 12 months, eight of Vietnam’s 16 Politburo members have visited Washington, while half a dozen Cabinet-level U.S. officials have traveled the other way.

Capping an unprecedented level of engagement, Obama received Vietnamese Communist Party leader Nguyen Phu Trong in the Oval Office in July and is expected to visit Vietnam next year.

In October 2014, the United States partially relaxed an arms embargo on Vietnam and is helping Hanoi improve its coast guard capabilities to counter China’s growing presence in the South China Sea.

But the clearest indication of rapprochement between Hanoi and Washington has been Vietnam’s inclusion in the ­Trans-Pacific Partnership, a U.S.-led 12-nation regional trade deal that excludes China. That deal, Vietnam hopes, will help reduce its economic dependence on China, with which it runs a large and growing trade deficit.

Workers toil on the Cat Linh-Ha Dong railway project. (Quinn Ryan Mattingly/For The Washington Post)

A section of track under construction in Hanoi at sunset. (Quinn Ryan Mattingly/For The Washington Post)

It is a strategic shift grounded in public opinion, where fears of Chinese domination are deeply ingrained and are traced back to occupation by imperial China in ancient times.

In 1979, the countries fought an intense border war that left tens of thousands dead: These wounds are much fresher in the Vietnamese psyche than the far deadlier “American war.”

Despite breakneck economic growth north of the border, few Vietnamese want to speak Chinese, while many clamor to learn English.

Indeed, the Vietnamese rank among the United States’ greatest fans and China’s foremost skeptics, Pew Research surveys show, with 78 percent of people here holding a favorable view of the United States, compared with just 19 percent for China.

Challenge for communists

For Vietnam’s Communist Party, this presents a challenge: It formed close ties with its Chinese counterpart as both came to power after World War II and has since followed a similar path of economic reform and political repression. But it cannot afford to be seen as bowing down to Beijing.

Even though the party contains a powerful conservative pro-Beijing faction, the fact that so many Politburo members have visited Washington in advance of Vietnam’s leadership transition, due early next year, tells its own story.

“The party has to take into account public opinion,” said Thuy at the Diplomatic Academy. “No one wants to appear soft in protecting Vietnam’s national interest or appear too accommodating towards China.”

Foremost among Vietnamese concerns is China’s massive land reclamation project in the South China Sea. During Xi’s recent visit, Vietnam’s top leaders asked the Chinese president not to pursue further militarization of the disputed islands, but he rebuffed them, declining to repeat a pledge he made in Washington in September, officials said.

Less than two weeks after Xi left, National Assembly member Truong Trong Nghia said Vietnam should not accept any loans or aid from China, arguing that they undercut Hanoi’s ability to negotiate over territorial disputes.

That isn’t going to happen. Vietnam knows it needs good relations with China: History and geography dictate that it cannot afford to make Beijing an enemy. Vietnam will not turn its back on Chinese investment, but it will pick and choose carefully, and it certainly does not trust China’s intentions.

“The Chinese government and the media are not very smart,” said a leading Chinese professional in Hanoi, speaking on the condition of anonymity to discuss a sensitive subject. Beijing’s propaganda machine has bombarded the world with talk of Xi’s grand regional plans, “without thinking about how that might make others feel,” he said.

Xu Yangjingjing contributed to this report.

Read more:

In Cambodia, the push and pull of China’s orbit

A remote corner of China wants access to the sea. The obstacle is North Korea.

Chinese companies face culture shock in countries that aren’t like China

In Central Asia, Chinese inroads in Russia’s back yard

In a country where the leader gets 96 percent of the vote, what’s next?