Anyone who appreciates irony can give a shout-out to South Korea, which has asked for thousands of rounds of assault-rifle ammunition for its peacekeepers in South Sudan — from, of all people, the Japanese. The request comes amid growing violence in one of Africa’s poorest countries, and a bitter political dispute between the East Asian rivals.

South Korea has long accused Japan of failing to face up to its militarist past, and on Thursday condemned a visit by Prime Minister Shinzo Abe to a shrine in Tokyo linked to Japan’s wartime era.

About 280 South Korean peacekeepers are stationed at a U.N. base in South Sudan’s Jonglei state, where thousands of civilians have sought shelter as fighting between rival ethnic groups threatens to grow into full civil war.

Three Indian peacekeepers were killed in an ambush in the region last week, and four U.S. Navy SEALs were wounded during an evacuation mission. The U.N. Security Council has approved an emergency plan to send an additional 5,000 peacekeepers to South Sudan.

Although the South Korean troops have not been drawn into the fighting yet, they forwarded a request on Sunday for 10,000 rounds of 5.56-mm ammunition. As it turns out, the only other peacekeepers in South Sudan who use the same type of ammunition are a contingent from Japan.

It was an awkward request for both sides. The two countries are engaged in a bitter feud over territorial claims and other issues related to Japan’s colonial and wartime occupation of the Korean Peninsula. South Korean officials canceled the signing of an important intelligence-sharing agreement with Japan last year, and President Park Geun-hye has refused to meet with Japanese Prime Minister Abe since taking office 10 months ago.

The Abe administration wanted to approve the ammunition request, but faced domestic hurdles. Japan’s pacifist constitution, born of catastrophic defeat in World War II, bars the country from exporting or otherwise providing weapons and other war-related material to third parties.

Abe called an emergency meeting of Japan’s National Security Council on Sunday and a special meeting of his Cabinet the following day. The Cabinet produced a lengthy, lawyer-like decision approving the ammunition transfer, citing the threat to civilian refugees and South Korean troops, and the “urgency” of the situation. The ammo was shipped from the Japanese base on Monday.

“It is quite ironic that South Korea asked for Japan’s help, but taken as a whole it was a pragmatic and appropriate action on both sides,” says Narushige Michishita, director of the Security and International Studies Program at the National Graduate Institute for Policy Studies in Tokyo.

As it turns out, the 400 or so Japanese troops in South Sudan probably could afford to give up some of their ammo. By law, they are restricted to performing engineering and humanitarian missions, and are forbidden to engage in combat unless it is for self-defense. By arrangement with the U.N., security for the Japanese is provided by a contingent of peacekeepers from the Rwandan army. No word on whether they’ve asked for additional ammo.