The Pentagon’s Missile Defense Agency says it successfully tested, for the first time ever, its ability to shoot down an incoming intercontinental ballistic missile—the kind of missile North Korea has threatened to launch at the United States.

The test took place on Tuesday afternoon, shortly after the target missile blasted off from the U.S. military’s outpost on Kwajalein Atoll in the mid-Pacific. As the target streaked toward America’s West Coast, an upgraded Ground-Based Midcourse Defense interceptor launched from Vandenberg Air Force Base in California.

Somewhere in space over the Pacific, the two projectiles collided.

“The intercept of a complex, threat-representative ICBM target is an incredible accomplishment,” Vice Adm. Jim Syring, MDA director, said in a statement.

It’s true. Dr. Phil Coyle, who served as the Pentagon’s top weapons-tester , compared GMD to “hitting a bullet with a bullet.” But while successful in a controlled environment, there’s no guarantee a similar intercept would work in the real world.

Military missileers were optimistic ahead of Tuesday’s test. They’d added new technology to one of the U.S. Army’s arsenal of Ground-Based Midcourse Defense rockets, or GMDs, 36 of which are located at Fort Greely in Alaska and Vandenberg. The Missile Defense Agency is in the process of adding another eight rockets to the existing force.

The GMD is a roughly 50-foot-tall, three-stage, solid-fuel rocket booster with a small “kill vehicle” at its tip. Cued by space-, land-, and sea-based radars in the seconds following the liftoff of an enemy rocket and launched from an underground silo, a GMD climbs just outside of the atmosphere and releases its kill vehicle, which—in concept—strikes and destroys the incoming enemy rocket.

The recent enhancements to the GMD include better electronics on the booster and new maneuvering thrusters on the kill vehicle. But the GMD, which President George W. Bush rushed into service in 2004 after five years of mostly unsuccessful trials, has never worked very well—despite the upgrades and Tuesday’s success.

The GMD has missed its target in nine of 18 tests since 1999. U.S. taxpayers have poured around $40 billion into the program, so far.

Tuesday’s successful intercept was a badly-needed triumph for the program. All previous tests involved intermediate-range ballistic missiles as targets. These IRBMs move slower than the bigger, farther-flying ICBMs. Compared to an IRBM, an ICBM traveling at up to seven kilometers per second is much harder to hit—even when missile-controllers know exactly where the target is coming from, and when.

It’s about time the GMD started working as designed, Dr. Laura Grego, a missile expert with the Massachusetts-based Union of Concerned Scientists, told The Daily Beast. The intercept on Tuesday “is a test to start to demonstrate what the system was meant to do this whole time, namely defend against an ICBM-range target,” Grego said.

Yet it’s still not clear that the GMD system would work during an actual attack. Military planners expect that North Korea or another rogue state—to say nothing of Russia or China—would launch decoys alongside real warheads during any nuclear sneak-attack.

A barrage of decoys could distract any intercepting GMDs.

To defend against decoys, the Missile Defense Agency wants to pack several small kill vehicles inside the nose cone of a single GMD booster. This so-called Multiple Kill Vehicle add-on was in development from 2004 to 2009, when then-Defense Secretary Robert Gates canceled it on technical grounds.

If the standard GMD is like hitting a bullet with a bullet, then a GMD armed with Multiple Kill Vehicles, each trying to hit a single decoy or warhead in a barrage of them, is “like hitting a shotgun with a shotgun when the defender’s shotgun shell only has a dozen or fewer pellets,” Coyle said.

“If the enemy launches more warheads, or launches more countermeasures... than the number of small kill vehicles the MKV can carry, the MKV will be overwhelmed.”

Still, the Missile Defense Agency believes that, with the latest technology, the MKV can work. The agency quietly resumed work on the program in 2015. As part of its first full budget proposal, the Trump administration wants to spend $260 million on the MKV, begin testing it within three years and start adding it to the GMD rockets in 2025.

Realistically, for the MKV to work against an ICBM surrounded by decoys, the baseline GMD first had to work against a standalone ICBM. The Pentagon was counting on its Tuesday missile-defense test to prove it wasn’t heaping expensive, unworkable tech on top of expensive, unworkable tech.

For once, the pricey missile-interceptor didn’t let the military down.