It was a cosmic smash-up watched around the world.
A NASA spacecraft intentionally slammed into an asteroid Monday in a historic test of humanity's ability to protect Earth from a potentially catastrophic collision with a space rock.
The agency's DART probe, short for Double Asteroid Redirection Test, carried out the first-of-its-kind maneuver on a small and harmless space rock known as Dimorphos, which is about 6.8 million miles from Earth.
The $325 million mission was designed to see whether "nudging" an asteroid can alter its trajectory, providing scientists with a valuable real-world test of planetary defense technologies.
The DART spacecraft, which is about the size of a vending machine, crashed into Dimorphos at 7:14 p.m. ET, flying head-on into the space rock at 14,000 mph.
A camera aboard DART captured live views of Dimorphos' getting bigger as the probe neared the asteroid. In the minutes before impact, the probe beamed back jaw-dropping details of the space rock's craggy, uneven surface.
"Oh my goodness," said Elena Adams, a DART mission systems engineer at the Johns Hopkins University Applied Physics Laboratory.
Cheers erupted when the spacecraft's signal dropped, signifying that the probe had, indeed, hit its target just after it sent its last images.
NASA Administrator Bill Nelson congratulated the DART team, saying efforts by the international group of scientists will help humanity protect Earth from incoming asteroids.
"We are showing that planetary defense is a global endeavor and it is very possible to save our planet," Nelson said.
It may take up to several weeks for NASA to confirm any changes in the space rock's trajectory. The goal is to shorten the asteroid's nearly 12-hour orbit by several minutes.
In a real-life planetary defense situation, even a small change in an asteroid's trajectory - provided it is still far enough - could avert a doomsday impact.
Dimorphos, which measures 525 feet wide, orbits a much larger, 2,500-foot asteroid named Didymos. Neither Dimorphos nor Didymos pose threats to Earth, according to NASA.
The DART spacecraft launched into space in November and spent 10 months journeying to its asteroid target.
The probe was not expected to survive the crash. Asmall, Italian-built satellite that was deployed as part of the mission, was to fly within 25 to 50 miles of Dimorphos a few minutes after the impact to snap photos.
In the days and weeks ahead, ground-based telescopes will be used to study Dimorphos and time its orbit. A mission led by the European Space Agency, scheduled to launch in 2024, will study the impact crater on the asteroid and examine Dimorphos and Didymos in greater detail.
NASA hopes the DART crash will take up to 10 minutes off Dimorphos' orbit around Didymos. Over time, that relatively small change is expected to grow. If it is successful, it would demonstrate the effectiveness of carrying out such a maneuver when a potentially hazardous asteroid is millions of miles away.
The DART mission is functioning as a proof of concept of asteroid deflection as a planetary defense strategy. Data from the test will not only demonstrate whether the idea works, but also help NASA understand how it could be applied in the future.
NASA's Planetary Defense Coordination Office is tasked with searching for near-Earth objects that could pose threats to the planet. The agency said no known asteroid larger than 450 feet across has a significant chance of hitting Earth in the next 100 years, but scientists have warned that only a small fraction of smaller near-Earth objects have been found.
Although the prospect of "killer asteroids" may sound far-fetched, the threat is all too real, said Bruce Betts, the chief scientist at the Planetary Society, a nonprofit organization that conducts research, advocacy and outreach to promote space exploration.
The best-known example of a cataclysmic impact occurred around 66 million years ago, when the Chicxulub asteroid, thought to have been 6 to 10 miles wide, slammed into Earth and triggered a sudden mass extinction. The incident annihilated the dinosaurs and killed almost three-quarters of all the plant and animal species that were living on Earth at the time.
The largest asteroid impact in recorded history took place 114 years ago, when a space rock exploded over a remote part of Siberia in 1908. The incident, which came to be known as the "Tunguska explosion," flattened trees over 500,000 acres of uninhabited forest, according to NASA. Mysteries about the Tunguska incident remain, but scientists have said the impact was most likely caused by a space rock measuring 164 to 262 feet across.
Even much smaller space rocks can cause widespread damage.
In 2013, a tennis court-size space rock measuring about 65 feet wide streaked across the sky and exploded in the atmosphere roughly 20 miles over Chelyabinsk, Russia.
The explosion released energy equivalent to about 440,000 tons of TNT, according to NASA. The blast and its shock wave blew out windows and flattened trees over hundreds of square miles. More than 1,600 people were injured.
"Chelyabinsk was a wake-up call," Betts said. "People started taking it much more seriously after that, and the idea of planetary defense became much more accepted publicly."
Betts said he hopes the DART mission will continue to raise awareness about the importance of planetary defense.
"It's preparing for an unusual kind of disaster, because it has the potential for catastrophic damage, but these things don't happen very often," he said. "But if we plan for it and put in the effort now, it will pay off and we can actually prevent a huge disaster in the future."
This article was originally published on NBCNews.com