A U.S. Navy destroyer in the Pacific used an enhanced missile to shoot down a medium-range ballistic missile target during a test on Tuesday, one day after North Korea test-launched a similar missile that flew over Japan.

In the "complex missile defense flight test," the USS John Paul Jones detected and tracked a test ballistic missile that had been launched from Kaui, Hawaii, then fired two of its onboard SM-6 missiles to intercept the target in its terminal phase, the Missile Defense Agency said in a release.

The test marked the second time an SM-6 has hit a medium-range ballistic missile, the agency said, without mentioning North Korea's test this week.

"We are working closely with the fleet to develop this important capability, and this was a key milestone in giving our Aegis BMD ships an enhanced capability to defeat ballistic missiles in their terminal phase," said Missile Defense Agency Director Lt. Gen. Sam Greaves. "We will continue developing ballistic missile defense technologies to stay ahead of the threat as it evolves."

In December, John Paul Jones fired two SM-6 missiles against a test medium-range ballistic missile. The missile is made by Raytheon. In a release on Wednesday morning, the company said it rushed enhanced software for the missile based on a request from the government. The SM-6, which is part of the Standard Missile family, is the only sea-based missile that can knock down ballistic missiles in their terminal phase, while also handling air and surface threats, the company said.

"Earlier this year, our customer requested an enhanced capability to deal with a sophisticated medium-range ballistic missile threat," said Mike Campisi, Raytheon's SM-6 senior program director. "We did all this — the analysis, coding and testing — in seven months; a process that normally takes one to two years."

The Pentagon on Tuesday confirmed that North Korea fired an intermediate-range ballistic missile near Sunan Air Base, which then flew over northern Japan before landing in the Pacific Ocean 500 nautical miles east of Japan. North Korean leader Kim Jong Un later threatened further action.

"The current ballistic rocket launching drill like a real war is the first step of the military operation of the KPA in the Pacific and a meaningful prelude to containing Guam," Kim said, according to state-run media outlet KCNA.

The White House responded to the North Korean launch on Tuesday, saying "all options are on the table."