A spacecraft colliding with an asteroid might sound like a terrible mistake. But NASA, the U.S. space agency, plans to make that happen later this year. The unmanned spacecraft, called DART, blasted off from Vandenberg Space Force Base in California this past November. Early next fall, it’s expected to finally reach its target: an asteroid called Dimorphos. DART will slam into the space rock at 15,000 miles per hour. The goal is to slow the asteroid’s speed—and slightly change its path.

Scientists say Dimorphos poses no danger to people here on Earth. The closest it has come to this planet is about 4.5 million miles. So why send DART into deep space just to be destroyed?

“The purpose of this test is to demonstrate that we can deflect an asteroid that might someday be a hazard to Earth,” says Lindley Johnson, NASA’s planetary defense officer.

Scientists at NASA and other space agencies are currently tracking more than a million asteroids orbiting the sun. Luckily, the vast majority of them fly harmlessly by our planet.

Thousands of small space rocks do enter Earth’s atmosphere each year, but most burn up before reaching the ground. Others fall into the ocean. A huge asteroid causing massive damage to life on this planet isn’t out of the question, however. An asteroid the size of a small city smashed into part of present-day Mexico about 65 million years ago. It may have been what wiped out the dinosaurs.

Fortunately, scientists say there’s little threat of anything like that happening in the next 100 years. Still, DART will help them prepare, just in case.