It sounds like something out of a sci-fi movie, but it's a wild possibility scientists are actually exploring: how to fit a space station inside an asteroid.

Why would we attempt such a bizarre feat of astro-engineering? Because the spin of the asteroid would create enough gravity for mining equipment to be effectively used, giving us a way to tap into the rich minerals and deposits inside these celestial rocks.

In addition, researchers suggest the asteroid's rocky hull could also help keep the mining station safe from the dangers of being out in space – cosmic ray radiation and all.

This crazy idea might just be possible, according to a new study from astrophysicists at the University of Vienna in Austria, who applied some advanced gravity models to a hypothetical asteroid measuring 500 metres by 390 metres (1,640 feet by 1,280 feet).

"Loads resulting from centrifugal forces… [make] a space station in the cavern of a mined asteroid feasible," write the researchers, though there are a lot of unknowns here – the right dimensions and materials would need to be chosen, and the asteroid would need to be strong enough to support a station.

"Practical applications will crucially depend on knowing not only the composition but also the internal structure of candidate bodies," adds the team. "As missions to these asteroids seem inevitable for such studies, decisions on inhabiting such asteroids may only be possible after mining operations have started."

While the dimensions of the asteroid used in the scientists' models roughly match some space rocks we've already observed – including 3757 Anagolay, 99942 Apophis and 3361 Orpheus – much of the composition of these asteroids isn't known at the moment.

With that in mind, it's too early to start working on an asteroid mining station just yet. Nevertheless, the study – which hasn't yet been peer-reviewed – concludes that something like this might be workable, perhaps using a metal cylinder to house a habitat and equipment.

"If we find an asteroid that's stable enough, we might not need these aluminium walls or anything, you might just be able to use the entire asteroid as a space station," one of the team, astrophysicist Thomas Maindl, told Leah Crane at New Scientist.

In the numbers crunched by Maindl and his colleagues, it was assumed that the asteroid was made of solid stone, and that gravity 38 percent as strong as that on Earth would be needed to keep a space station in place – and to prevent mining equipment from floating off into space.

To reach that level, and to keep humans and robot workers in place on the rock, the asteroid would need to spin between one and three times a minute, to produce enough centrifugal force, the researchers calculate.

A lot of preparation work would be required to make this a reality, of course. We'd need to know the asteroid wasn't in any danger of splitting apart, for example. If it were stable, though, then hypothetically we could carve out anything from a small outpost to a more expansive space station.

Asteroid mining is a big deal: there's a good chance these interstellar rocks and other Near-Earth Objects might give us the resources we need to travel deeper into space, without having to rely solely on Earth for supplies and fuel.

If we're going to set up permanent homes outside of this planet, then it makes sense to use what's close by to build and power them – which is where asteroid mining comes in. This new study gives one possible way of making that happen more easily.

However, the asteroid would need to be carefully monitored as it was mined, just in case its rotation threatened to slow down, or the rock itself was in danger of falling apart. Maindl himself admits we're still a long way off.

"The border between science and science fiction here is sort of blurry," Maindl told New Scientist. "My gut feeling is that it will be at least 20 years before any asteroid mining happens, let alone something like this."

The team's paper is available on the arXiv.org pre-print site.