President Barack Obama is scheduled to visit Vietnam next week for the first time in his two-term administration. The trip offers the latest sign of tightening economic and security ties between the U.S. and Vietnam — one of Asia’s fastest growing economies and an increasingly pivotal player in regional politics.

Obama will arrive just months after the U.S., Vietnam and 10 other nations signed the Trans-Pacific Partnership, a massive international trade pact designed in part to give American companies more access to Asia-Pacific markets. The president’s trip also comes as Vietnamese leaders seek to improve U.S. relations as a hedge against China’s more assertive foreign policy.

Tensions with Beijing have helped push Vietnam toward the United States, its former wartime foe, at the same time that Obama has strived to expand U.S. influence in the region. The White House is likely to end a ban on arms sales to Vietnam ahead of Obama’s visit, Foreign Policy reported last week. The move would allow Hanoi to buy sophisticated American military hardware, such as radar or surveillance aircraft, to monitor contested waters in the South China Sea.

RTSBTNL Labourers work at a construction site of a residential apartment in Hanoi, Vietnam, March 16, 2016. Photo: kham/reuters

Vietnam, meanwhile, has enjoyed steady economic growth in recent years thanks to a vast expansion in manufacturing and construction, rising domestic demand and a surge in foreign direct investment, including from U.S. investors. The Southeast Asian nation’s gross domestic product rose 6.7 percent last year — its strongest performance in seven years, the Asian Development Bank reported.

Vietnam’s Prime Minister Nguyen Xuan Phuc, who was sworn into office in April, is tasked with sustaining that growth over the next five years. Under the Communist Party’s new socioeconomic plan for 2016 to 2020, the nation will target as much as 7 percent average annual expansion over that period.

Yet the challenge to meet that target this year has increased during the last few months. The collapse in global crude oil prices shrank the state’s income, while drought and saltwater intrusion battered production of rice and other agricultural staples.

GettyImages-503798590 This picture taken on Jan. 6, 2016 shows farmers harvesting cabbage on a field on the outskirts of Hanoi. Photo: HOANG DINH NAM/AFP/Getty Images

Vietnam’s GDP growth slowed to 5.46 percent in the first quarter of this year, compared to 7.01 percent growth in the last quarter of 2015, Bloomberg reported. Phuc has few resources to enact a sweeping economic stimulus if needed: The country already faced a $2 billion budget deficit in the first quarter, while debt payments grew 5.3 percent.

Vietnamese leaders “need to show [that] Vietnam continues to be an attractive designation for foreign investment and a relevant economy in the region,” Nguyen Xuan Thanh, a senior fellow at Harvard's Kennedy School of Government and director of the Public Policy Program at the Fulbright School in Ho Chi Minh City, told Bloomberg in April. “They need to provide growth and job creation. A less-than-7 percent growth will be very, very disappointing.”

Within a few years, however, the Trans-Pacific Partnership, or TPP, could deliver a sustained boost to Vietnam’s economy by drastically reducing the tariffs it pays to export cell phones, textiles and other consumer goods. The Peterson Institute in Washington recently estimated the American-led trade pact could increase Vietnam’s GDP by 8.1 percent by 2030, making the nation one of the deal’s biggest winners.

RTX29OJ3 People work at the office of food-finder app Lozi in Hanoi, Vietnam, April 7, 2016. Vietnam's tech startups are emerging as a force to be reckoned with as foreign private equity funds bet the country's talented young brains will yield more successes. Photo: REUTERS/Kham

TPP participants still need to finalize and ratify the free-trade agreement, a process that could require years of tough negotiations. In the U.S., members of Congress and 2016 presidential candidates have expressed strong opposition, threatening to derail the deal. Critics of the TPP say the plan would allow nations to relax standards on human rights, environmental protection, labor unions and internet privacy in exchange for creating more favorable business conditions abroad.

Hillary Clinton, the Democratic front-runner in the presidential race, has said she opposed the deal, although she frequently supported TPP talks while serving as the U.S. secretary of state from 2009 to 2013. “I don’t believe it’s going to meet the high bar I have set,” she told PBS NewsHour in October.

Donald Trump, the presumptive Republican nominee, has called the free-trade pact “a horrible deal” that he said would benefit China, which is not among the participating members.

The Obama administration has said the deal would set higher standards for global trade that could eventually mirror U.S. criteria. But other observers have framed the TPP as a broader geopolitical tactic to boost America’s economic links in Asia at a time when China is exerting greater political authority in the region.

Japan, another key TPP player, recently clashed with China after two Chinese military aircraft reportedly entered Japanese and South Korean airspace in February. The Philippines, which didn’t join the trade deal, is embroiled in a long-standing maritime dispute with Beijing in the South China Sea. Manila has accused Beijing of violating United Nations conventions by turning reefs into military-grade aircraft runways in the contested waters.

GettyImages-492525637 This picture taken from a Vietnam Coast Guard ship on May 14, 2014 shows a China Coast Guard ship (left) chasing a Vietnam Coast Guard vessel near the site of a Chinese drilling oil rig being installed at the disputed water in the South China Sea off Vietnam's central coast. Photo: HOANG DINH NAM/AFP/Getty Images

Vietnam is also feuding with Beijing over who owns what part of the expansive sea. Officials in Hanoi have repeatedly objected to China’s construction of airstrips and other facilities on reefs and islands in the Spratly and Paracel chains. Vietnam earlier this year accused China of violating its sovereignty by landing a plane on an artificial island.

The timing of President Obama's visit to Hanoi is symbolic: The U.S. war in Vietnam ended 41 years ago in late May. The nations normalized relations 20 years later in 1995 under former President Bill Clinton, who became the first U.S. leader to visit Vietnam since the war ended. President George W. Bush also visited in 2006.

Obama’s visit to Hanoi next week is part of a broader Asian trip from May 21 to 28, which includes the G7 summit in Japan and a bilateral meeting with Japanese Prime Minister Shinzo Abe.