HANOI, Vietnam — Secretary of State John Kerry told a group of Vietnamese officials and business leaders on Friday that improvements in human rights here would lead to deeper ties.

“Progress on human rights and the rule of law will provide the foundation for a deeper and more sustainable strategy and strategic partnership between the United States and Vietnam,” Mr. Kerry said in a speech marking the 20th anniversary of the restoration of diplomatic ties between the wartime adversaries.

“Only you can decide the pace and the direction of this process of building this partnership, but I’m sure you’ve noticed that America’s closest partnerships in the world are with countries that share a commitment to certain values,” he added.

Mr. Kerry arrived here in the Vietnamese capital on Thursday night for talks on trade and security issues, his final stop on a five-nation trip to the Middle East and Asia.