WASHINGTON — President Obama will become the first sitting American president to visit Hiroshima, Japan, making a heavily symbolic stop this month at the site where the United States first used an atomic bomb at the end of World War II.

The visit, which had been under consideration for most of Mr. Obama’s presidency, could serve as a coda to the transformation in the relationship between Japan and the United States from wartime enemies to the closest of allies. But it also has the potential to open old wounds, and it will take place in the shadow of a growing nuclear threat from North Korea.

Both American and Japanese officials sought to avoid any appearance that the visit would amount to an apology for the bombing, which killed more than 100,000 people.

“He will not revisit the decision to use the atomic bomb at the end of World War II,” Benjamin J. Rhodes, Mr. Obama’s deputy national security adviser for strategic communication, said in a post on Medium. “Instead, he will offer a forward-looking vision focused on our shared future.”