Star trajectory numbers published in a new study suggest that up to 16 stars could come close enough to our galaxy to send potentially dangerous cosmic matter, like comets, crashing into Earth.

The prospect of unsettled space material smashing into our planet is enough of a fear for agencies like NASA to start ramping up planetary defense systems.

The US space agency has already dedicated a division to track near-Earth objects and there is a plan to carry out an asteroid redirection tests with the European Space Agency (ESA) in the next five years.

READ MORE: NASA to build asteroid-smashing probe to divert Didymos space rock (VIDEO)

Astronomer Coryn Bailer-Jones of the Max Planck Institute for Astronomy has now crunched the numbers on the possibility of stellar encounters with the solar system – and a collision is possible.

Following a study of the radial velocities of about 320,000 documented stars, Bailer-Jones has surmised that 16 stars could come within two parsecs – or 61 trillion kilometers – of the sun.

While a direct hit by a star on the sun or Earth is unlikely, the study highlights that an object passing by the Milky Way could “influence” or dramatically shift material floating around in space.

According to Bailer-Jones, if a star were to pass close enough to an area like the Oort cloud, a space on the edge of the solar system thought to contain icy comets, then these objects could be thrown in various directions of the galaxy – potentially putting Earth at risk.

“Tidal forces could shear the Oort cloud, the postulated body of primordial comets orbiting in the cold, dark outskirts of the solar system,” the study states.

“This could push some bodies into the inner solar system in the form of comet showers, where they could potentially impact the Earth.”

Bailer-Jones estimated the star paths by tracing the history of certain bodies like K7 dwarf GI 710, which is estimated to make the closest approach. The star may come within nine trillion kilometers of the sun in 1.3 million years.

The new study was helped by measurements captured by Hipparcos, a European Space Agency satellite launched in 1989, as well as updated radial velocity data on stars contained in catalogues Tycho-2 and VizieR, which is managed by the Strasbourg Astronomical Data Center (CDS).

It also used the first data release from GAIA, an extensive ESA mission to chart one billion stars in the Milky Way.

Bailer-Jones plans to use future Gaia data releases to give a more precise indication of star movements.