If humans are ever to live and explore in deep space for extended periods, space gas stations may prove a vital necessity. Toward that end, NASA has awarded contracts to four companies with plans to study how to store and transfer fuel in space.

It's not simply a matter of building a Shell station in orbit. Rocket fuel is cryogenic, meaning super-cold substances like liquid oxygen and liquid hydrogen. If not kept extremely chilled and protected, some of those liquids tend to boil off into gases.

"Storing cryogenic propellants such as liquid hydrogen and liquid oxygen in space for long periods of time with minimal boil-off is critical for deep space human exploration," according to a NASA statement. [Gallery: Visions of the Future of Spaceflight]

With NASA's space shuttles now retired, the agency is embarking on a program to pursue human missions to an asteroid by 2025, and to Mars by the mid 2030s, per a directive by President Barack Obama. For these missions, and eventual colonies in space, spaceships will likely need to refuel either in orbit or on the surface of another planet or moon.

NASA's Exploration Technology Development Program awarded a total of $2.4 million to Analytical Mechanics Associates Inc. of Hampton, Va., Ball Aerospace & Technologies Corporation of Boulder, Colo., The Boeing Company of Huntington Beach, Calif., and Lockheed Martin Space Systems Company in Littleton, Colo., for the project.

"Each company will provide a final report to help define a mission concept to demonstrate the cryogenic fluid management technologies, capabilities and infrastructure required for sustainable, affordable human presence in space," said the NASA statement.

The projects will focus on identifying gaps in current technology necessary for space gas stations, and investigating innovative ways to pursue building the depots.

Eventually, NASA aims to fly a test mission to try out the technologies developed through the program.

Toward a similar goal, NASA launched an experiment called the Robotic Refueling Mission to the International Space Station on the shuttle Atlantis in July. The project, installed on the station's exterior during a spacewalk, allows the laboratory's Dextre robot to test space refueling techniques on a satellite mockup.

You can follow SPACE.com senior writer Clara Moskowitz on Twitter @ClaraMoskowitz. Follow SPACE.com for the latest in space science and exploration news on Twitter @Spacedotcomand on Facebook.