The threat to northern Australia had diminished by the second half of 1942, because the strategic initiative in the Pacific had been regained by the Allied side. The Japanese navy had experienced two decisive defeats, first in the Coral Sea in May, and then at the Midway Islands in June, seriously damaging Japan's naval air power, which had been the key to its early victories. From mid-1942 onward, the role of the Townsville bases was no longer the defence of Australia, but logistical support for the Allied offensive into Japanese-held territory.