AI SpaceFactory, a design agency that 's based in New York, just won $500,000 for having won the top prize in a NASA competition to 3D print a habitat that could be used on the moon or in Mars. Coming in second place was Penn State who got $200,000.

NASA, in partnership with Bradley University in Illinois, initially opened the competition in 2015 and it took place in stages, which all culminated on May 1-4. All in all, there were 60 teams which collectively won more than $2 million in prizes from NASA.

AI SpaceFactory's winning design is called Marsha. It is designed to be tall and slim so as to reduce the need for construction rovers on unfamiliar terrain. It is designed to be built on a vertically telescoping arm attached to a rover, that stays still during construction.

"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."

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.

The competition itself was held at Caterpillar's Edwards Demonstration & Learning Center in Edwards, Illinois, wherein each team went through a 30-hour challenge to build their designs making use of automated construction techniques, with literally no human interference, demonstrating that the process could work autonomously on other worlds.

The teams' habitats were built in 10-hour stretches and as a panel of judges examined their work taking note of the qualities of completed structures. Each team's habitat was judged based on material mix, durability, leakage and strength. The teams were only asked to build a smaller version, about one-third-scale, of each of their designs.

"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."