On the two-and-a-half-hour drive between Hanoi and the karst peaks of Halong Bay, tourists barely see the countryside. Industrial sprawl lines the road for most of the trip, which comprises just one segment of northeastern Vietnam’s increasingly ballooning industrial corridor, with factories producing everything from Ford Focuses to iPhone cameras.

Just north of Hanoi in Thai Nguyen province in the Yen Binh industrial zone is the massive Samsung complex sprawling 100 hectares. The Thai Nguyen facility, along with seven other Vietnamese factories, produces most of the world’s Samsung smartphones and accounts for around a quarter of the nation’s exports.

Apple suppliers are also increasingly in on the game, with South Korea’s LG Innotek, a camera module manufacturer for iPhones, having recently opened a plant in Haiphong, a seaside city home to a new deepwater port that allows quick, easy access to global markets. LG Display, which supplies OLED touch screens to Apple, also operates in Haiphong.

The facts on the ground are clear; Vietnam, once dependent on garments and other cheap exports, has begun to rival China’s tech sector. And with Asian businesspeople increasingly resigned to a protracted trade war between Washington and Beijing, firms are more eager than ever to escape tariffs by relocating to China’s smaller southern neighbor.

Most telling was the decision of Goertek, the Chinese company assembling Apple’s AirPods, to reroute all production of the earbuds to Vietnam. The company’s chairman, Jiang Bin, was upfront about the geopolitical considerations: “Due to macro-economic factors — such as external market fluctuations and China-US trade disputes — the company’s operation and management has become more difficult,” he said in the company’s 2018 biannual report, which was reported by the Australian Broadcasting Corporation.

The advantages of production in Vietnam over its northern neighbor were mounting even before U.S. President Donald Trump took office. In Shenzhen, China, the home of the Apple supplier Foxconn’s flagship Longhua industrial complex, the monthly minimum wage is now 2,200 yuan ($315). In contrast, Vietnam’s highest minimum wage (the national government sets a multitier minimum wage based on regional living costs) is almost half that at 3.98 million Vietnamese dong ($170). Wages fall even lower away from major cities—in Thai Nguyen’s Pho Yen district, the home of the Samsung factory, the minimum wage is a mere 3.09 million dong ($130).

Vietnam is also a prolific signer of free trade agreements, having first inked the Trans-Pacific Partnership when the United States was still involved during President Barack Obama’s administration and then again in its renegotiated form without the United States. Europe is on its agenda as well, with the final text of a free trade agreement with the European Union agreed upon in July.

Signing these deals with established market economies has required a degree of liberalization not seen in China—Vietnam comes in 68th place on the World Bank’s ranking of countries by the ease of doing business there, whereas China comes in 78th. China and Vietnam also have their own free trade agreement, allowing firms in Vietnam to cheaply import raw materials from the north for manufacture and export.

And while fears linger that Vietnam, too, will find itself in Trump’s sights—he has publicly grumbled over the $38.35 million trade deficit with Vietnam—Hanoi’s leaders appear to have gotten on the U.S. president’s good side. When Prime Minister Nguyen Xuan Phuc visited the White House in 2017, he came bearing a gift of $8 billion worth of contracts with U.S. firms, a move that won public praise from Trump.

Perhaps more important is the convergence of Vietnam’s defense aspirations and Trumpian economics. Hanoi, a longtime customer of the Russian arms industry, has long wanted to purchase high-tech U.S. weaponry to defend its interests in the South China Sea from Beijing. The gate finally opened in 2016 when Obama lifted the Vietnam War-era ban on weapons exports to the United States’ former foe, opting instead to sell armaments on a case-by-case basis.

While geopolitics analysts focus on what, exactly, should be sold to Vietnam while balancing relations with China, Trump evidently sees the potential sales as a business opportunity.

At a meeting with Phuc during a November 2017 state visit to Hanoi, Trump virtually instructed his counterpart to buy U.S. arms. “We make the best equipment, we make the best military gear and planes and anything you can name,” he said to Phuc inside Vietnam’s presidential palace.

“The missiles are in a category that nobody even comes close,” he added.

While there is no evidence that missiles are forthcoming—likely a bridge too far for both Washington and Beijing alike—weapons sales have been coming slowly but steadily. The Louisiana-based company Metal Shark Boats, which counts the U.S. Navy and Coast Guard as clients, has sold a dozen military patrol boats to Vietnam since 2017, while Boeing has reportedly been selling reconnaissance drones to Hanoi.

The Vietnamese aviation industry may have also picked up on Trump’s hint to buy American. In a particularly bizarre move, the FLC Group, a Hanoi-based conglomerate largely focused on real estate, agreed this year to buy 20 Boeing 787 Dreamliners at $5.6 billion for its planned Bamboo Airways, a staggeringly massive number of planes for a start-up. And Vietjet, the country’s largest privately owned airline, agreed in July to spend $12.7 billion for 100 Boeing 737s. While the trade deficit is almost certainly not going to be eliminated, Vietnam has acutely responded to Trump’s most high-profile recommendations.

As the world’s most populous country, China still has some advantages over Vietnam. China’s workforce, while older than Vietnam’s and not particularly better educated, still has more highly skilled workers thanks to sheer size. Manufacturing in the world’s second-largest economy also has its perks, with firms able to access Chinese consumers without crossing borders. Vietnam will have to train its workforce harder and faster to compete. Some progress is being made—Vietnamese university students in the United States already comprise the sixth-largest student population by nationality, slightly less than neighboring Canada and more than Mexico.

But with China likely to remain a rival to the West for the foreseeable future, Vietnam’s willingness to get along with power centers in North America and Europe provides a political advantage that’s unlikely to vanish, and its growing strategic partnership with the Pentagon links the U.S. bilateral economic relationship with defense. Already climbing the ladder of the global supply chain and willing to make reforms to accommodate free trade agreements, Vietnam has become not just a cheaper but also a friendlier alternative to China in the Trump era.