Astronomers discovered a car-size asteroid hours before it slammed into Earth and burned up in the atmosphere this past weekend, news sources report.

Scientists in Hawaii initially spotted the asteroid, named 2019 MO, on Saturday (June 22). Soon after, the heavenly traveler broke apart in large fireball as it hit the atmosphere about 240 miles (380 kilometers) south of San Juan, Puerto Rico, according to the University of Hawaii.

This is only the fourth time in history that scientists have spotted an asteroid so close to impact. The other three detections all occurred within the past 11 years, including 2008 TC3, 2014 AA and 2018 LA, which landed as a meteorite in southern Africa just 7 hours after it was noticed by scientists. [Doomsday: 9 Real Ways Earth Could End]

Unlike 2018 LA, Earth's latest visitor was harmless and didn't make it to the ground. But the asteroid, 13 feet (4 meters) long, still made a spectacular fireball that was equivalent to about 6,000 tons of exploding TNT, according to the Center for Near Earth Object Studies (CNEOS), which is run by the Jet Propulsion Lab in Pasadena, California.

The asteroid's impact was so powerful, even satellites in orbit spotted it. Satellites operated by the National Oceanic and Atmospheric Administration (NOAA) recorded its impact and destruction at 5:25 p.m. EDT (21:25 UTC), as you can see on this tweet below.

At the time of impact, 2019 MO was traveling about 33,300 mph (14.9 km/s), CNEOS reported. NOAA's Geostationary Lightning Mapper onboard the satellite GOES-East also mapped the asteroid, according to The Weather Channel.

The fact that scientists detected the asteroid before its annihilation is cause for celebration. This is the first time that two survey telescopes — the University of Hawaii's ATLAS (Asteroid Terrestrial-impact Last Alert System) and Pan-STARRS (Panoramic Survey Telescope and Rapid Response System) — showed that they can "provide sufficient warning to move people away from the impact site of an incoming asteroid," according to a statement.

Using these telescopes, astronomers observed 2019 MO four times in just 30 minutes, when the asteroid was just 310,600 miles (500,000 km) from Earth, or 1.3 times the distance from Earth to the moon.

At first, scientists gave it a two out of four rating, meaning it appeared unlikely to hit Earth. But as more data came in, they upgraded 2019 MO to a four. The Nexrad (Next-Generation Radar) weather network in Puerto Rico, which is operated by NOAA's National Weather Service, also spotted the asteroid, pinpointing its entry location, according to Cnet.

2019 MO was much smaller than the 66-foot-long (20 m) meteor that exploded over Chelyabinsk, Russia, in 2013. The energy released by that meteor was equivalent to about 440,000 tons of TNT.

Now that ATLAS is up and running (it began operating in 2015), it will detect all kinds of asteroids, big and small. The system's two telescopes, situated 100 miles (160 km) apart, scan the night sky for asteroids every two nights. Since then, hey have discovered about 100 asteroids larger than about 100 feet (30 m) in diameter every year.

In theory, ATLAS should be able to find smaller asteroids, such as 2019 MO, about half a day before they arrive and larger objects, like the Chelyabinsk meteor, a few days before they hit, the university said.

That's good news, as we could all use a warning before asteroids cause enormous fireballs in the sky or send chunks of space rock hurtling toward Earth.

Originally published on Live Science.