NASA launched a spacecraft early Wednesday to test technology to alter the course of an asteroid by slamming into it, the world's first full-scale mission of its kind to better prepare for defending Earth against hazardous space objects.

The Double Asteroid Redirection Test spacecraft is on a one-way trip to the Didymos asteroid system, aiming to intentionally collide with moonlet Dimorphos, which is approximately 160 meters in diameter, between Sept. 26 and Oct. 1 next year.

The spacecraft, built and managed by Johns Hopkins University and roughly the size of a vending machine, took off from the Vandenberg Space Force Base in California on Tuesday night local time, carried aboard a Falcon 9 rocket developed by U.S. Space Exploration Technologies Corp., or SpaceX.

A rocket carrying the Double Asteroid Redirection Test spacecraft is launched at the Vandenberg Space Force Base in California on Nov. 23, 2021. (Photo courtesy of NASA)(Kyodo)

Dimorphos is not a threat to Earth, the U.S. National Aeronautics and Space Administration said in its press release, adding that the goal is to "slightly change" the asteroid's motion in a way that can be accurately measured using ground-based telescopes.

The spacecraft will ram into Dimorphos at a speed of roughly 6 kilometers per second, shortening the asteroid's orbit around Didymos by several minutes. The Didymos system is within 11 million km from Earth.

"This test will help prove out one viable way to protect our planet from a hazardous asteroid should one ever be discovered that is headed toward Earth," NASA Administrator Bill Nelson said in the press release.

Lindley Johnson, planetary defense officer at NASA Headquarters said, "We have not yet found any significant asteroid impact threat to Earth, but we continue to search for that sizable population we know is still to be found."

Related coverage:

Japan's Hoshide, 3 other astronauts return safely aboard SpaceX ship

China launches spaceship carrying female astronaut to space station

Japan, Israel startups to team up to make oxygen on Moon