TOKYO — North Korea had launched its third barrage of short-range missiles in just over a week, parading its growing ability to strike its neighbors with devastating firepower.

But instead of banding together against a common adversary last week, the two American allies in the path of the missiles — Japan and South Korea — were locked in their own bitter battle, whose roots stretch back over 100 years.

The discord stems from Japan’s colonial occupation of the Korean Peninsula before and during World War II, and what, if anything, it still owes for abuses committed during that era, including forced labor and sexual slavery. The long-simmering conflict erupted into a full diplomatic crisis on Friday, when Japan threatened to slow down exports of materials essential to South Korean industries.

By Saturday night, thousands of protesters marched in the streets of Seoul, accusing Japan of an “economic invasion” and threatening an intelligence-sharing agreement that the United States considers crucial to monitoring North Korea’s nuclear buildup.