A multimillion-dollar spacecraft collided head-on with an asteroid the size of a football stadium on Monday in an unprecedented test of Nasa’s capacity to defend Earth from a doomsday scenario.

Nasa’s craft successfully crashed into the asteroid Dimorphos 6.8m miles from Earth. The mission, known as Dart (Double Asteroid Redirection Test), marked humanity’s first attempt at moving another celestial body, with the goal of seeing if a large asteroid hurtling toward our planet could be successfully diverted.

The spacecraft collided with the asteroid at 15,000mph at 7.14pm EDT. Live-streamed video showed the asteroid’s rubble-strewn surface looming into focus before the spacecraft hit and cheers erupted in the mission control room. Teams of Nasa and Johns Hopkins University scientists hugged each other as Dart’s successful impact with Dimorphos was confirmed.

Shortly after impact, Lori Glaze, Nasa’s planetary science division director, declared it a “new era of humankind”.

“[It’s] an era in which we potentially have the capability to protect ourselves from something like a dangerous hazardous asteroid impact,” said Glaze. “What an amazing thing. We’ve never had that capability before.”

Samson Reony, the Johns Hopkins applied physics laboratory mission commentator, was equally exuberant about the “game changing” achievement. “This is when science, engineering and a great purpose, planetary defense, come together, and, you know, it makes a magical moment like this,” he said.

The test aims to determine if intentionally crashing a spacecraft into an asteroid is an effective way to change its trajectory. A relatively similar strategy involving a nuclear missile rather than an unmanned spacecraft failed during a key point in the plot of Morgan Freeman’s fictional 1998 planetary disaster film Deep Impact.

At a post-mission press conference, Dart scientists described the mission as a success but cautioned that it will be about two months before they know if the spacecraft succeeded in its ultimate objective of altering Dimorphos’s trajectory.

They hailed Monday as the “ideal outcome” of the first stage of the planetary defense test. Dart scored “basically a bullseye” on the asteroid, Dart deputy program manager Elena Adams said.

“We knew we were going to hit. All of us were holding our breath. I’m kind of surprised none of us passed out.”

She said the craft had landed 17 meters from its target; close enough to represent a complete success. “It was basically a bullseye. I think, as far as we can tell, the first planetary defense test was a success, and we can clap to that.”

Whether the impact had enough force to move the asteroid remains to be seen, and scientists will spend the next weeks monitoring the asteroid’s speed and movements, and making calculations. Even so, Adams said: “Earthlings should sleep better, and I definitely will.”

Scientists insisted Dart would not shatter Dimorphos. The spacecraft packed a scant 1,260 pounds (570 kilograms), compared with the asteroid’s 11bn pounds (5 bn kilograms). Dart’s planned self-destruction posed no threats to humanity, Nasa spokesperson Glen Nagle said.

Nagle said Monday’s test was the first of a series of “planetary protection missions”.

“We want to have a better chance than the dinosaurs had 65m years ago,” Nagle said, referring to the theory that the prehistoric reptiles which once ruled Earth went extinct when an asteroid struck the planet.

Nagle added: “All they could do is look up and go, ‘Oh asteroid.’”

While no known asteroid larger than 459ft (140 meters) in size has a significant chance of hitting Earth for the next century, it’s estimated that only 40% of those asteroids have been identified so far.

The $325m planetary defense test was the culmination of a journey that began with Dart’s launch last fall. The opportunity for online earthlings to watch the collision with Dimorphos live, or at least on a few minutes’ delay, came from what Nasa calls the mission’s own “mini-photographer”, the LiciaCube (short for Light Italian CubeSat for Imaging Asteroids).

Mission managers expressed their “absolute joy” at watching the successful impact take place in real time.

Ralph Semmel, director of the Johns Hopkins applied physics laboratory, hailed the “game-changing” nature of what had just been achieved, adding that his team knew they had been successful when the video blacked out. “Normally, losing signal from a spacecraft is a very bad thing. But in this case, it was the ideal outcome.”