The Boeing-managed ground-based system intended to shield the continental United States intercepted a simulated incoming missile over the Pacific Ocean for the first time Sunday, the Pentagon said.

The Ground-based Midcourse Defense (GMD) system, with a $40 billion price tag, aims to protect against long-range ballistic missiles from so-called rogue states such as North Korea and Iran.

The successful test followed the system’s failure to hit a simulated missile in five of eight previous tests since president George W. Bush’s administration launched the program in 2004.

President Barack Obama’s administration has announced it plans to spend about $1.3 billion on 14 more interceptors, but only if the closely-watched test was successful.

The interceptor missile was fired from Vandenberg Air Force Base in California and struck a dummy intermediate-range ballistic missile launched from the US Army’s Reagan Test Site on Kwajalein Atoll in the Marshall Islands.

“This is a very important step in our continuing efforts to improve and increase the reliability of our homeland ballistic missile defense system,” Missile Defense Agency chief Vice Admiral James Syring said in a statement.

The latest version of the warhead flown for the test contained hardware and software upgrades, according to manufacturer Raytheon.

It was the first successful intercept by Raytheon’s Exoatmospheric Kill Vehicle Capability Enhancement II, or EKV CE-II, which failed in both previous tests conducted in 2010.

“We made the fixes needed to be made from the last test, which was back in December of 2010,” Pentagon spokesman Admiral John Kirby told reporters on Friday.

He compared the test to “hitting a BB with a BB… It’s pretty significant if it works.”

“Testing is critically important to ensuring the advancement of reliable kill vehicles for the protection of the US and its allies,” Raytheon Missile Systems president Taylor Lawrence said.

Overall, the test marked the 65th successful intercept out of 81 attempts since 2001 for the Ballistic Missile Defense System, according to the Pentagon.

“This mission met several complex test objectives, including a long-duration flight time for the ground-based interceptor and high velocity closing speeds for intercept,” a “proud” Boeing said.

But some experts were critical even ahead of the $200 million test, saying the system was not ready for deployment, regardless of the outcome.

“Even if Sunday’s test is successful, it would demonstrate little about the kill vehicle’s capability and reliability,” said Laura Grego of the Union of Concerned Scientists.

“It would be the first time in three tries that it hit its target, but 33 percent is still a failing grade — and not a good argument for buying more.”