New York-based design agency AI SpaceFactory took the top prize in a NASA competition to 3D print a habitat that could be used on the moon or Mars.

AI SpaceFactory won $500,000 for its efforts, while the second-place recipient, Penn State, got $200,000.

The winning habitat, called Marsha , is tall and slim, to reduce the need for construction rovers on unfamiliar terrain, according to AI SpaceFactory. It is designed to be built on a vertically telescoping arm attached to a rover, which stays still during construction. AI SpaceFactory plans to adapt Marsha's design for an eco-friendly Earth habitat called Tera; a crowdfunding campaign will begin shortly, the design agency said in a statement.

Related: How 3D Printers Could Reinvent NASA Space Food

Team AI SpaceFactory won first place in the final phase of NASA's 3D-Printed Habitat Challenge with Marsha, a tall, thin proposed habitat for the surface of Mars designed to be built autonomously. Scroll through visualizations of the winning design above.

"We developed these technologies for space, but they have the potential to transform the way we build on Earth," David Malott, CEO and founder of AI SpaceFactory, said in the statement. "By using natural, biodegradable materials grown from crops, we could eliminate the building industry's massive waste of unrecyclable concrete and restore our planet."

The awards came after a grueling 30-hour challenge in which the participants created one-third-scale structures of their architectural designs, according to a statement from NASA. Each team used robotic construction techniques that are supposed to have little human interference, demonstrating that the process could work autonomously on other worlds.

The competition took place May 1-4 at Caterpillar's Edwards Demonstration & Learning Center in Edwards, Illinois. Teams built their habitats in 10 hour stretches as a panel of judges examined their work. The completed structures had to pass tests for qualities such as material mix, durability, leakage and strength.

Views of the 3D habitat printing, testing and winning teams.

"Martha" takes shape.

AI SpaceFactory's 3D printed structures went through a smoke test to check the habitat's ability to hold a seal.

Victory!

AI SpaceFactory took home $500,000.

The habitat built by the third-place team, Penn State, undergoes a water seal test.

"The final milestone of this competition is a culmination of extremely hard work by bright, inventive minds who are helping us advance the technologies we need for a sustainable human presence on the moon, and then on Mars," Monsi Roman, program manager for NASA's Centennial Challenges, said in NASA's statement. "We celebrate their vision, dedication and innovation in developing concepts that will not only further NASA's deep-space goals, but also provide viable housing solutions right here on Earth."

The competition, which opened in 2015 and took place over several stages, attracted 60 teams that collectively won more than $2 million in prizes from NASA. NASA's major partner in the competition was Bradley University in Illinois.

Original article on Space.com.