The US on Thursday test-launched a new ballistic missile from Vandenburg Air Force Base in California — a test that was previously banned by an arms-control treaty from which President Trump withdrew this year.

“The US Air Force, in partnership with the Strategic Capabilities Office, conducted a flight test of a prototype conventionally-configured ground-launched ballistic missile,” Lt. Col. Robert Carver told The Post in an email from the scene.

“The test missile exited its static launch stand and terminated in the open ocean after more than 500 kilometers [310 miles] of flight. Data collected and lessons learned from this test will inform the Department of Defense’s development of future intermediate-range capabilities,” he added.

The US formally withdrew from the landmark 1987 Intermediate-range Nuclear Forces Treaty with Russia in August after determining that Moscow was violating the pact, an accusation the Kremlin has denied.

The treaty, negotiated by then-President Ronald Reagan and Soviet leader Mikhail Gorbachev, banned land-based missiles with a range of between 310 and 3,400 miles.

It was the second test by the Pentagon that would have not been allowed under the INF treaty. In August, it tested a ground-launched cruise missile with a range of more than 310 miles.

Thursday’s test came as North Korea has hinted that it could undertake its own ballistic missile test within weeks as a “Christmas gift” if the US does not come up with concessions in bilateral relations by the end of the year.

The space launch Western Range at Vandenburg had warned boaters to remain out of the waters off the northern section of the base earlier this week, according to the Noozhawk of Santa Barbara.

The North Base area included in the mariners’ notice is near underground silos used for intercontinental ballistic missile tests, the news outlet reported.

On Wednesday, Vandenburg spokeswoman Robin Ghormley was tight-lipped about the planned activity.

“Vandenberg regularly is used by DOD and different partners to evaluate different systems,” she told Noozhawk.

In March, Pentagon officials said they planned to test an intermediate-range ballistic missile toward the end of the year.

“As part of the US integrated response to Russia’s violations of the INF Treaty, the United States announced it would commence treaty-compliant research and development of conventional, ground-launched missile concepts in late 2017,” Carver said.

“Following the US suspension of its obligations under INF in February 2019, DOD began conceptual design activities on ground-launched cruise missile and ballistic missile systems, activities which would have been inconsistent with our obligation under the treaty,” he added.

During the annual Defense News Conference in September, Robert Soofer, deputy assistant secretary of defense for policy for nuclear and missile defense, confirmed that the Pentagon was on track for that test.

“I do believe it is still the plan to conduct a ballistic missile test before the end of the year,” he said at the time, according to the Defense News, which reported that the missile has a potential range of roughly 1,800 to 2,500 miles.

Pentagon officials have speculated that any deployment of such a missile — potentially to Guam — would not be likely for at least five years, the outlet reported.

With Post wires