HANOI, Vietnam — The specter of the Vietnam War followed Defense Secretary Jim Mattis here, even as he tried to shake it.

“We respect our past, but we look to our future,” he said several times before and during his two-day visit, as he tried to focus discussions on his new strategy of developing military relationships in Asia to blunt the influence of big state powers such as Russia and China.

Yet the bloody conflict, which claimed hundreds of thousands of Vietnamese and more than 58,000 U.S. troops, loomed during several meetings with senior officials and U.S. personnel in Hanoi.

Mattis began a two-day visit in Vietnam on Wednesday with a briefing from the Defense Department agency responsible for recovering and identifying the remains of prisoners of war and troops missing in action, with nearly 1,300 personnel still unaccounted for.

Afterward, Mattis inspected the detritus of the war, including a rotted M-16, the warped shell of a Claymore anti-personnel mine and rusted bayonets. On a nearby table were four plates with a dress uniform hat from each of the military services, and upturned glasses, to signify the war’s perpetuity for the families of troops who never came home.

Reminders of the war were present even in talks designed to demonstrate budding relations.

In a meeting Thursday with Communist Party General Secretary Nguyen Phu Trong,   Mattis announced finalizing plans to port the aircraft carrier USS Carl Vinson in Danang this March. A large bust of Communist war leader Ho Chi Minh watched over separate talks with Trong and President Tran Dai Quang.

Mattis thanked Vietnamese officials for their cooperation in recovering missing troops and recognized the years-long U.S. efforts to clean up toxic sites in the south, where Agent Orange and other defoliants were kept.

In recent years, the Department of Veterans Affairs has offered treatment and compensation for certain ailments linked to the disease among Vietnam veterans.

Mattis also spent time at an ancient Buddhist pagoda. “Beautiful. Peaceful. It makes you think more deeply,” he told a monk escorting him on the grounds.

A memorial across the street marked a more chaotic event. John McCain parachuted into the lake that surrounds the pagoda when his aircraft was shot down in 1967.

The “Hanoi Hilton,” the infamous jail where McCain and other prisoners were kept, is just blocks from where the Pentagon delegation stayed.

Mattis has tried to walk a fine line during his visit — acknowledging the war in subtle moments but keeping the focus on the future. And the future appears to be more tension in Asia.

China and Vietnam have sparred for decades over their land border and control of islands and waters, sometimes leading to violent confrontations.

But it’s the five-decade-old war, which here is called the American War, that is inescapable in daily life.

Bustling Hanoi streets advertise war propaganda scrawled with triumphant slogans; on one poster, U.S. jets are shown crashing to the ground.

“America,” a shopkeeper said, with a wide grin.

Mattis departed Vietnam on Thursday night, days before the 50th anniversary of the Tet Offensive.

An avid military historian, he told reporters he hadn’t considered the significance of an anniversary of the most pivotal battle in the war. Mattis is a retired general who earned his commission the year after the offensive, and he said he was raised in the Marine Corps by officers who served in Vietnam.

“We respect the past, but it was definitely forward looking,” he reiterated on his flight to Hawaii, where he will meet with his South Korean counterpart Friday.

As the flight prepared for takeoff for Hawaii, a Pentagon staffer walked through the cabin with a gift from the Vietnamese government: two identification cards of U.S. troops once displayed in a museum but now being presented in a red felt case.

Read more: