President Obama called for an end to nuclear weapons in a solemn visit to Hiroshima to offer respects to the victims of the world’s first deployed atomic bomb. (Reuters)

Nearly 71 years after an American bomber passed high above this Japanese city on a clear August morning on a mission that would alter history, President Obama on Friday made a solemn visit to Hiroshima to offer respects to the victims of the world’s first deployed atomic bomb.

In the Hiroshima Peace Park guest book, Obama wrote:

“We have known the agony of war. Let us now find the courage, together, to spread peace, and pursue a world without nuclear weapons.” In later remarks, he said that scientific strides must be matched by moral progress or mankind is doomed.

Obama’s visit, the first to Hiroshima by a sitting U.S. president, had stirred great anticipation here and across Japan among those who longed for an American leader to acknowledge the suffering of the estimated 140,000 killed during the bombing on Aug. 6, 1945, and its aftermath. That figure includes 20,000 Koreans who had been forced by the Japanese military to work in the city for the imperial war machine.

Three days after the Hiroshima bombing, a second U.S. atomic bomb hit Nagasaki, killing a total of 80,000, including an additional 30,000 Koreans. Most of those killed in both cities were civilians. The Japanese emperor announced his nation’s surrender a week later.

An illustrated guide to the Hiroshima and Nagasaki nuclear bombings

On Friday, people lined streets as Obama’s motorcade entered the city. The presidential limousine pulled up behind the Peace Memorial Museum.

In the park, guests were seated just in front of the curved, concrete cenotaph that pays tribute to the dead with an eternal flame burning just beyond it. The Genbaku Dome, or A-bomb dome, the preserved, skeletal remnants of a municipal building destroyed in the blast, was visible in the distance.

National security adviser Susan E. Rice and U.S. Ambassador to Japan Caroline Kennedy walked out from near the museum, along with their Japanese counterparts, followed by Obama and Japanese Prime Minister Shinzo Abe.

Then Obama was handed a wreath, and he laid it on a stand in front of the cenotaph. He bowed his head and stood silently for a minute. Abe then did the same.

“We come to ponder a terrible force unleashed in a not-so-distant past,” Obama said. The souls of the people who died in this city “speak to us,” he added. “They ask us to look inward, to take stock of who we are and what we might become.”

The president called for nations to reconsider the development of nuclear weapons and to roll back and “ultimately eliminate” them.

“The world was forever changed here,” he said. “But today, the children of this city will go through their day in peace. What a precious thing that is. It is worth protecting, and then extending to every child. That is the future we can choose, a future in which ­Hiroshima and ­Nagasaki are known not for the dawn of atomic warfare but as the start of our own moral awakening.”

After the remarks, Obama and Abe walked to the front row to greet Sunao Tsuboi, a survivor of the atomic blast, who stood up clutching a walking cane. Then Obama greeted Shigeaki Mori, another survivor, giving him a hug.

The president and prime minister then walked north toward the dome. Reporters rushing to get photographs of the two got involved in an aggressive shoving match with Secret Service agents and Japanese security officials.

Obama and Abe stood together gazing at the dome for several minutes. Abe appeared to be explaining the significance to Obama. To their left was a statue of Sadako Sasaki, a child who died of radiation and became known for her colorful paper cranes, which have become a symbol of Hiroshima’s effort to promote peace.

Nuclear nonproliferation experts said Friday’s events at Hiroshima would be useful in highlighting the ongoing threat.

“It certainly was a powerful and important gesture of reconciliation and remembrance,” said Daryl G. Kimbal, executive director of the Washington-based Arms Control Association. “Obama’s visit puts the spotlight again on the continuing and grave risks posed by nuclear weapons, and the urgent need for renewed American and global leadership to deal with it. We hope President Obama will follow up with additional concrete actions to chart the course toward a world without nuclear weapons.”

Obama’s visit was infused with symbolism for the two nations that have evolved from bitter World War II enemies into close allies.

Before the ceremony, Obama visited the Marine Corps air station in Iwakuni, about 25 miles south of Hiroshima, and spoke to a group of U.S. and Japanese troops. He told them that his trip to Hiroshima was “an opportunity to honor the memory of all who were lost during World War II.”

Obama added: “It’s a chance to reaffirm our commitment to pursuing the peace and security of a world where nuclear weapons would no longer be necessary. And it’s a testament to how even the most painful divides can be bridged; how our two nations — former adversaries — cannot just become partners but become the best of friends and the strongest of allies.”

The Iwakuni base, where U.S. Marines work side by side with Japanese forces, “is a powerful example of the trust and the cooperation and the friendship between the United States and Japan,” he said.

Previous U.S. presidents had avoided Hiroshima over fears that a visit would be regarded as an apology for President Harry S. Truman’s decision to authorize the bombings, which historians say were carried out in an attempt to avoid a planned invasion of Japan.

And this visit did not escape political criticism.

Sarah Palin, the 2008 Republican vice-presidential nominee, assailed Obama for what she described as an “apology lap” in Hiroshima. At a large Donald Trump campaign rally in downtown San Diego, Palin accused Obama of “dissing our vets” with the visit. She said the visit suggested that the president believes “the greatest generation was perpetuating the evil of World War II.”

But Obama and his advisers believed the time was right, in his final year in office, to make the pilgrimage — not as an apology but rather to highlight the alliance between the two nations and to warn of the dangers of modern nuclear weapons exponentially more powerful than the bombs dropped in Japan.

Obama has had mixed success in reducing and safeguarding global stockpiles of nuclear weapons and fissile materials. Aides said he hoped his visit, with seven months left in office, would reaffirm the U.S. commitment to nuclear disarmament and nonproliferation.

A day before his visit while attending an economic summit in Ise City, Obama called the use of atomic bombs an “inflection point in modern history” and said the fate of such weapons “is something that all of us have had to deal with in one way or another.”

While Obama has called for deep cuts in nuclear weapons and measures to stop nuclear proliferation, he has come up short of targets he set himself early in his presidency. He has slashed spending on programs to stop nuclear proliferation, left intact military spending on a new generation of nuclear-capable weapons, failed to persuade Pakistan and India to give up their nuclear material stockpiles, and renewed a nuclear-cooperation accord with China that would allow it to pursue commercial plutonium reprocessing, heightening the risk of theft or purchase of dangerous nuclear materials.

Many proliferation experts say the deal with China could heighten the chances of a plutonium-
reprocessing arms race in northeast Asia, and four lawmakers on Thursday introduced a bill to tighten restrictions in the China agreement.

“They still need to do more,” Henry Sokolski, executive director of the Nonproliferation Policy Education Center, said of the Obama administration. “They should follow Congress’s call to work with others to promote a pause to prevent the piling up of nuclear gunpowder in the form of plutonium for ‘peaceful purposes.’ ”

For Obama, another challenge was to use the visit to advance the process of reconciliation in the ­Asia-Pacific region, where wartime grievances have been slower to heal than among some of the European combatants of World War II.

Obama sought to make clear that while all sides suffered, all sides also bear responsibility for the horrors of war, even as Japan and its neighbors continue a bitter debate over long-ago wartime atrocities.

The White House has said it would welcome Abe to Pearl Harbor, where plans are underway to mark the 75th anniversary of the Japanese attack on Dec. 7. One senior U.S. official said he would be surprised if Abe did not come, though the prime minister said at a news conference this week that he had no such plans at this time.

Abe reminded reporters that he gave a speech to the U.S. Congress during a state visit to Washington last spring that reflected on the war and the sacrifices of Americans. The prime minister also accompanied Obama on a tour of the World War II Memorial, where Abe laid a wreath and prayed for the souls of the dead.

Carol Morello and Steven Mufson in Washington contributed to this report.

Carol Morello and Steven Mufson contributed to this report.