North Korea fired an intermediate-range ballistic missile over Japan, escalating tests of weapons designed to strike key targets in regional US allies.