WASHINGTON — The American military on Thursday carried out a rare long-range mission over the Korean Peninsula, sending two nuclear-capable B-2 stealth bombers on a practice sortie over South Korea, underscoring Washington’s commitment to defend its ally amid rising tensions with North Korea.

The two B-2 Spirit bombers showed the United States’ ability to “provide extended deterrence to our allies in the Asia-Pacific region” and to “conduct long-range, precision strikes quickly and at will,” the American command in the South Korean capital, Seoul, said in a statement.

This mission was the first time the bat-winged B-2s were launched toward the Korean Peninsula on a nonstop, round-trip mission from the United States. The bombers dropped inert munitions, not live explosives, on a range off South Korea’s coast.

While the mock bombing run was part of a previously planned joint exercise between South Korean and American forces, it came at a time of rising rhetorical tension with the North. At a Pentagon news conference on Thursday, senior officials made clear that the mission was intended to serve as a deterrent to North Korea — and to reassure South Korea and Japan, both allies.