The U.S. Missile Defense Agency successfully shot down a dummy warhead in space over the Pacific Ocean Tuesday during a test of a missile defense system that would protect the country from intercontinental ballistic missiles like the ones being developed by North Korea.

"During the test, an ICBM-class target was launched from the Reagan Test Site on Kwajalein Atoll in the Republic of the Marshall Islands," said a statement from the agency. "A ground-based interceptor was launched from Vandenberg Air Force Base, California, and its exo-atmospheric kill vehicle intercepted and destroyed the target in a direct collision."

The test was the second successful intercept after two previous failures in 2014, and brings the record of successes to 10 hit in 18 tries, or 55 percent.

"The intercept of a complex, threat-representative ICBM target is an incredible accomplishment for the GMD system and a critical milestone for this program," said MDA Director Vice Adm. Jim Syring, in the statement.

"This system is vitally important to the defense of our homeland, and this test demonstrates that we have a capable, credible deterrent against a very real threat. I am incredibly proud of the warfighters who executed this test and who operate this system every day."

The nearly quarter-billion dollar test is the most realistic test yet, designed to show how the U.S. could knock a North Korean nuke out of the sky if it fired such a weapon at the U.S.

"This is the first time we have ever conducted a test against an actual ICBM-class target for the ground-based midcourse defense system," said Navy. Capt. Jeff Davis, a Pentagon spokesman just hours before the test.