HIROSHIMA, Japan — President Barack Obama came face to face with the horror of nuclear war Friday in a somber visit to Hiroshima, becoming the first sitting U.S. president to tour the site of the atomic bombing 71 years ago that killed tens of thousands in an instant and ushered in the nuclear age.

In a sweeping address that reflected on the obligations of humankind, Obama wrestled with the inherent contradiction that centuries of technical advancement has both made it easier to bind people together and given them the capacity for the carnage seen in this city.

Speaking slowly and solemnly, the president noted that as weapons and tactics evolve, accompanying norms about whether to use them advances in fits and starts.

“The scientific revolution that led to the splitting of an atom requires a moral revolution as well,” he said. “That is why we come to this place.”

Obama did not apologize for the nuclear attacks here and in Nagasaki, strikes he believes ended the perils of Japanese aggression and brought about the end of World War II.

But as the leader of the only country ever to have deployed nuclear weapons, Obama said it is the duty of those who hold terrible power to accept the consequences of its use.

“Someday the voices of the hibakusha will no longer be with us to bear witness,” he said, using the Japanese term for survivors of the nuclear blasts.

The Peace Memorial Park he visited Friday afternoon marks the darkest days of Hiroshima, where about 350,000 Japanese civilians and military personnel were living on Aug. 6, 1945, the day the bomb fell.

Some 140,000 people died after a U.S. warplane targeted wartime Hiroshima, and 70,000 more in Nagasaki, where a second bomb was dropped days later. Japan soon surrendered.

Obama spent less than two hours in Hiroshima but seemed to accomplish what he came for. It was a choreographed performance meant to close old wounds without inflaming new passions on a subject still fraught after all these years.

In a solemn ceremony, Obama and Japanese Prime Minister Shinzo Abe placed wreaths before a stone monument at the park.

On Friday, the president spent a few minutes inside the Hiroshima Peace Memorial Museum, which features disturbing relics of the bombing, including singed clothing worn by students burned in the bombing.

“We have known the agony of war. Let us now find the courage, together, to spread peace, and pursue a world without nuclear weapons,” he wrote in the museum guest book.

In his address, Obama acknowledged that he would fall short of his goal of nuclear nonproliferation that he declared in 2009 at the start of his presidency in a speech in Prague.

Even then, he said he knew it might not be done in his lifetime. But nonetheless, he renewed his call in Hiroshima for a nuclear-free world, this time with the soberness of a president who will end his two terms with the nation still at war.

“We must change our mindset about war itself, to prevent conflict through diplomacy and strive to end conflicts after they've begun,” he said. And perhaps, above all, we must reimagine our connection to one another as members of one human race.”

After he spoke, Obama spent several moments with a very small number of survivors, including Sunao Tsuboi, an anti-war activist.

Sunao, now 92, told Obama he would be remembered as someone who listened to the voice of a few survivors. He urged him to come back and meet more.

“He was holding my hands until the end,” Sunao said.

Hiroshima residents who watched Obama's remarks had mixed reactions.

“I respect his courage to come here,” said Akira Kawasaki of the organization Peace Boat. But, he said, Obama shouldn't conflate the idea of ending wars and abolishing nuclear weapons. “Talking about both at the same time makes both more complicated.”

Also complicated was Abe's role in the day's events. Abe welcomed the president's message and offered his own determination “to realize a world free of nuclear weapons, no matter how long or how difficult the road will be.”

But Japan's leader made a point to dismiss any suggestion that he pay a reciprocal visit to Pearl Harbor.

In Japan, Pearl Harbor is not seen as a parallel for the bombings of Hiroshima and Nagasaki, but as an attack on a military installation that did not target civilians.

Tribune Washington Bureau's Michael A. Memoli and Associated Press contributed.

cparsons@tribune.com