NASA has taken another step on its planned journey to Mars.

The space agency has selected six companies to design prototype deep-space habitats — a key piece of the effort to send astronauts on the long trek to the Red Planet, which NASA aims to do by the end of the 2030s.

"The next human exploration capabilities needed beyond the Space Launch System (SLS) rocket and Orion capsule are deep-space, long-duration habitation and in-space propulsion," Jason Crusan, director of NASA's Advanced Exploration Systems, said in a statement. (Orion is too small to comfortably support crews for six to eight months at a time, which is how long it would take to get to Mars using currently available propulsion technology.) [Visions of Future Deep-Space Stations (Gallery)]

"We are now adding focus and specifics on the deep-space habitats where humans will live and work independently for months or years at a time, without cargo supply deliveries from Earth," he added.

The six chosen companies are Bigelow Aerospace, Boeing, Lockheed Martin, NanoRacks, Orbital ATK and Sierra Nevada Corp. They will share a total of about $65 million, which will be awarded via NASA's Next Space Technologies for Exploration Partnerships (Next-STEP) program.

That won't be enough to perform all the work, however; the companies will have to provide at least 30 percent of the habitat-development costs themselves, NASA officials said.

The six companies will have up to 24 months to develop ground prototypes and/or perform habitat concept studies.

"The ground prototypes will be used for three primary purposes: supporting integrated systems testing, human factors and operations testing, and to help define overall system functionality," NASA officials wrote in the same statement. "These are important activities, as they help define the design standards, common interfaces and requirements while reducing risks for the final flight systems that will come after this phase."

The Next-STEP program aims to spur commercial deep-space exploration capabilities, especially in Earth-moon space. NASA views this region as a vital "proving ground" in which to test out technologies needed for crewed Mars missions.

The newly announced awards are the second made via Next-STEP. The first round, announced in 2015, went to Bigelow, Boeing, Lockheed Martin and Orbital ATK to develop deep-space habitat concepts that could also help advance commercial capabilities in low-Earth orbit.

Follow Mike Wall on Twitter @michaeldwall and Google+. Follow us @Spacedotcom, Facebook or Google+. Originally published on Space.com.