Earth has a new buddy. NASA astronomers have detected an asteroid that is constantly circling the Earth as part of its orbit around the sun. This "quasi-satellite," known as 2016 HO3, has been with us for nearly a century — and will probably stay with us for centuries to come.

The video below, from NASA's Center for Near-Earth Object Studies, shows 2016 HO3’s very odd trajectory:

Like many objects in the solar system, 2016 HO3 orbits the sun. But almost a century ago, it wandered close enough to us that it’s now constantly getting tugged by Earth’s gravity, forcing it to make loops around our planet.

As NASA explains:

In its yearly trek around the sun, asteroid 2016 HO3 spends about half of the time closer to the sun than Earth and passes ahead of our planet, and about half of the time farther away, causing it to fall behind. Its orbit is also tilted a little, causing it to bob up and then down once each year through Earth's orbital plane. In effect, this small asteroid is caught in a game of leap frog with Earth that will last for hundreds of years.

We don't have to worry about this asteroid crashing into us — 2016 HO3 never gets closer than about 38 times the distance of the moon and never gets further away than about 100 times the distance of the moon. (It’s still unclear how big the object is, but NASA estimates between 40 and 100 meters.)

Because it’s so far away, the asteroid isn’t technically considered a satellite of Earth. "We refer to it as a quasi-satellite of Earth," said Paul Chodas, manager of NASA's Center for Near-Earth Object (NEO) Studies, in a statement. "One other asteroid — 2003 YN107 — followed a similar orbital pattern for a while over 10 years ago, but it has since departed our vicinity. This new asteroid is much more locked onto us."

This asteroid isn’t a threat to Earth — but NASA is looking for others that might be

NASA found this particular asteroid as part of its ongoing search for objects in space that could conceivably crash into us — and wreak widespread havoc. And there’s good news and bad news about this search.

The good: So far, scientists have located more than 90 percent of near-Earth asteroids that are a kilometer wide or larger. Those big asteroids are all capable of causing destruction on a global scale. And, fortunately, none of them are on track to hit us.

But that's not the end of the story. There are also plenty of smaller asteroids out there that could still cause massive damage if they hit us. During the 1908 Tunguska event, a 30- to 60-meter-wide asteroid exploded over Siberia, releasing the energy of 1,000 Hiroshima atomic bombs and flattening some 80 million trees. No one died because it was in such a remote region, but the prospect of a repeat is worrisome.

Such smaller asteroids have collided with Earth once every few centuries or so, on average, and we’ve only spotted a small fraction of them. Back in 2005, Congress ordered NASA to locate 90 percent of all near-Earth asteroids larger than 140 meters wide by 2020.

As of 2014, however, a NASA audit found that the agency had only located just 10 percent of these smaller and midsize asteroids. Not good. The report blamed a lack of coordination and organizational structure.

NASA is currently trying to improve its asteroid detection capabilities. Current ground-based telescopes can’t spot as many smaller objects as telescopes in space can (due to interference from the atmosphere). So the agency has proposed launching a space telescope called NEOCam for asteroid hunting. A private organization called the B612 Foundation is also raising $450 million for a complementary mission called Sentinel.

And, uh, what would we do if we actually spotted an asteroid barreling toward Earth? That’s still being sorted out. In 2022, NASA plans to crash a probe into a 550-foot-wide asteroid at more than 13,000 miles per hour to deflect it off its course — as part of a broader plan to figure out how to defend Earth from asteroids more generally. (And if that doesn’t work, we can always try sending an intrepid team of oil drillers...)

(Hat tip to George Dvorsky for the 2016 HO3 news.)

Read more: Why one former astronaut is trying to save the world from asteroids

The Pluto pics we waited 85 years to see