Visiting Hanoi, the president cemented a new strategic partnership that puts the memories of the past behind them and focuses on mutual concerns over Beijing’s assertiveness in the region.

President Biden cemented a new strategic relationship with Vietnam on Sunday, bringing two historical foes closer than they have ever been and putting the ghosts of the past behind them out of shared worry over China’s mounting ambitions in the region.

During a landmark visit to Hanoi by the American president, Vietnam’s Communist Party leadership formally raised the country’s ties to the United States to the highest level in Hanoi’s diplomatic hierarchy, equivalent to those it has with Russia and China. Mr. Biden said the breakthrough was “the beginning of even a greater era of cooperation” a half-century after American troops withdrew.

“Today, we can trace a 50-year arc of progress in the relationship between our nations, from conflict to normalization,” Mr. Biden said at a news conference after a meeting with Nguyen Phu Trong, the general secretary of the Communist Party of Vietnam. “This is a new elevated status that will be a force for prosperity and security in one of the most consequential regions in the world.”