President Barack Obama's visit to Cuba and Argentina last week had two main objectives: to end the half-century of enmity and mistrust between Havana and Washington, and to remove a major impediment to better relations with the rest of our Latin American neighbors. On both fronts we count the trip a success.

In Cuba, Mr. Obama told an audience in Havana that despite real differences that remain between the two countries it was time to bury the last remnants of the Cold War. In extending a hand of peace, he called on Congress to lift the economic embargo that has crippled the island's economy, and for greater investment there by U.S. businesses.

But he also implicitly reproached the government of Cuban President Raul Castro for its dismal human rights record, saying that while the U.S. wouldn't seek to impose change on Cuba, it would support the Cuban people's efforts to create a more democratic society with more opportunities for themselves and their families — a statement Mr. Castro could hardly have welcomed from a U.S. president whose remarks were being broadcast live on Cuba's state-controlled media.

The president acknowledged Cuban officials' own criticism of the U.S. — that it shouldn't lecture Havana when it had so many issues of racial and economic inequality of its own. But Mr. Obama rightly insisted that democracy makes it possible to correct such problems. His belief that engagement, rather than confrontation, is the most effective way of encouraging reform was aimed at a new generation of young people who were born after the Cuban Revolution and have no memory of the origins of the conflict between Cuba and the U.S.

After leaving Havana, the president headed for Buenos Aires, where he met with Argentine President Mauricio Macri, who was elected last year to lead a new center-right government that aims to reverse the anti-American, nationalist policies of its predecessors. Mr. Obama traveled there on what was essentially a fence-mending mission to renew good relations and set the tone for greater economic and diplomatic cooperation between the two nations.

In Argentina, the president also pledged to declassify documents relating to our role in that country's 1976 military coup and the “dirty war” that followed, in which tens of thousands of Argentine citizens were tortured or killed by the junta. America's involvement in that shameful episode has long been a sore point among families who lost loved ones to the state-sponsored terror, and Mr. Obama's willingness to release the documents was a deft piece of diplomacy widely seen as a gesture of reconciliation to the Argentine people as a whole.

None of that matters to the president's critics at home, of course. Their knee-jerk reaction goes no deeper than to say Mr. Obama never should have attended a baseball game in Havana or danced a tango in Buenos Aires and instead, should have come home immediately after the terrorist attack in Brussels last week — though it's unclear what they expected him to accomplish by that. And never mind that no U.S. president should ever allow a terrorist group to dictate his priorities. Meanwhile the GOP presidential candidates were unanimous in their fixation on a U.S. relationship with Cuba that has been frozen in time for more than 50 years. For some reason they simply can't get it through their heads that this isn't the 1960s any more, or that we are obliged to deal with all sorts of countries whose governments we don't like but with whom we engage anyway because we hope to change their behavior.

Mr. Obama is looking toward the future rather than the past. The decades-long effort to isolate Cuba has failed to bring greater political or economic freedom to ordinary Cubans, and it has cast a pall over our relationships with all the other countries in the region, including Argentina. When a policy is as counterproductive as the U.S. relationship with Cuba has been, it's time to try something different, and Mr. Obama had the foresight to finally say enough is enough.