The Vietnam vet toured the guided-missile destroyer USS John S McCain, named after his father and grandfather, both naval officers -- in southern Cam Ranh Bay.

The visit comes after a US warship sailed near an artificial island built by Beijing in the South China Sea last week.

The US also transferred seven security vessels to Vietnam last week.

The ship's routine technical stop on Friday was a "strong symbol of the positive trajectory of the US-Vietnam comprehensive partnership", according to a statement from the US Embassy in Vietnam.

McCain praised the American sailors as he toured the massive destroyer in the strategic southern port, Vietnam's largest naval base, with fellow senators Christopher Coons and John Barrasso.

"People all over America are grateful that you are here, far away from home, far away from your loved ones, representing the United States of America," he said.

McCain, a former navy pilot, was shot down during a bombing mission over North Vietnam in 1967 and famously became a prisoner of war in Hanoi's Hoa Lo prison, dubbed the "Hanoi Hilton".

His pilot uniform is today displayed in the prison, now a tourist attraction in communist Vietnam's capital city.

Vietnam has found itself increasingly alone in challenging China's island building campaign, especially as the Philippines warms up to regional superpower China.

US President Donald Trump's rise to the White House has also cast uncertainty over American foreign policy in the oil-rich waterway.

Agence France Presse - June 3, 2017