From an American gunboat decades ago, John Kerry patrolled for communist insurgents along the winding muddy waters of the Mekong Delta. From those familiar waterways that eventually turned the young lieutenant against the war, the top U.S. diplomat confronted a modern enemy Sunday — climate change.

In this remote part of southern Vietnam, rising sea waters, erosion and the impact of upstream dam development on the Mekong River are proving a more serious threat than the Viet Cong guerrillas whom Kerry battled in 1968 and 1969.

“Decades ago on these very waters, I was one of many who witnessed the difficult period in our shared history,” Kerry told a group of young professionals gathered near a dock at the riverfront village of Kien Vang.

“Today on these waters I am bearing witness to how far our two nations have come together, and we are talking about the future and that’s the way it ought to be,” he said.

That future, especially for the water-dependent economy of the millions who live in the Mekong Delta, is in jeopardy, he said.

Kerry pledged $17 million to a program that will help the region’s rice producers, shrimp and crab farmers and fisherman adapt to potential changes caused by higher sea levels that bring salt water into the delicate ecosystem.

Kerry said he would make it a personal priority to ensure that none of the six countries that share the Mekong — China, Myanmar, Thailand, Laos, Cambodia and Vietnam — and depend on it for the livelihoods of an estimated 60 million people exploits the river at the expense of the others.

In a pointed reference to China, which plans several Mekong Dam projects that could affect downstream populations, Kerry said: “No one country has a right to deprive another country of a livelihood, an ecosystem and its capacity for life itself that comes from that river. That river is a global asset, a treasure that belongs to the region.”

The Mekong’s resources must “benefit people not just in one country, not just in the country where the waters come first, but in every country that touches this great river.”

It was his first visit since 1969 to the delta’s rivers, which had made a vivid impression on him as a young officer. Kerry had made 13 previous postwar trips to Vietnam.

Kerry first set foot in Vietnam 44 years ago after volunteering for service because, as he has said, “It was the right thing to do.”

He was decorated with three Purple Hearts, a Silver Star and a Bronze Star for fighting in a conflict that he came to despise and call a “colossal mistake,” one that profoundly influenced his political career and strategic view.

“When I came home after two tours of duty, I decided that the same sense of service demanded something more of me,” he wrote in his 2003 book, “A Call to Service,” as he was unsuccessfully campaigning for the presidency in the 2004 election.

“The lesson I learned from Vietnam is that you quickly get into trouble if you let foreign policy or national security policy get too far adrift from our values as a country and as a people.”

On his first trip to Vietnam as secretary of state, he was determined to bolster the remarkable rapprochement that he had encouraged and helped engineer as a senator in the 1990s.

In the city he first knew as Saigon, the capital of the former South Vietnam, Kerry on Saturday met with members of the business community and entrepreneurs to talk up a trade agreement the U.S. is negotiating with Vietnam and nine other Asian countries.

By the end of Sunday, he was in Hanoi, where he planned talks with government officials today that were expected to focus on maritime security and territorial disputes in the South China Sea.

He also was expected to make the case that respect for human rights, particularly freedom of speech and religion, is essential to improved relations with the United States, and raise the issue of political prisoners.