Mr. Obama’s visit to Hiroshima Peace Memorial Park had all the pomp, ceremony and planned choreography of a state visit or a leader’s funeral. With thousands in attendance and much of Japan watching on TV, Mr. Obama walked forward alone at the park and laid a wreath on a white pyramid. He paused before the memorial’s cenotaph, his head bowed.

A moment later, Mr. Abe approached with his own wreath, which he laid beside Mr. Obama’s on another pyramid. After a moment’s reflection, the two leaders shook hands — a clear signal of the extraordinary alliance their two nations had forged out of the ashes of war.

Mr. Obama’s decision to visit Hiroshima was in part intended to reward Mr. Abe for his efforts to improve ties and forge a closer military relationship between the two countries. The recent slaying of a young woman on Okinawa, and the arrest of an American Marine veteran in the crime, has once again strained those ties, but coordination between the two nations’ militaries continues to intensify.

Mr. Obama also saw the visit as a testament to mankind’s ability to forge beyond even the most intense of enmities. Before arriving in Japan, Mr. Obama visited Vietnam, where he lifted a longstanding arms embargo.

The Hiroshima visit, under consideration since the first days of Mr. Obama’s presidency, could send ripples across Asia, a region still grappling with the echoes of World War II seven decades after it ended. Leaders in both China and South Korea worry that Mr. Obama’s visit to Japan’s deepest wound could be taken by the Japanese as an endpoint to their country’s fitful efforts to come to grips with their own wartime atrocities.