A dollar may not buy much these days, not even a cup of coffee. But apparently it’s enough to buy a small sample of rocks and soil from the moon.

NASA announced Thursday that several companies had won contracts to mine the moon and turn over small samples to the space agency for a small fee. In one case, a company called Lunar Outpost bid $1 for the work, a price NASA jumped at after deciding the Colorado-based robotics firm had the technical ability to deliver.

“You’d be surprised at what a dollar can buy you in space,” Mike Gold, NASA’s acting associate administrator for international and interagency relations, said in a call with reporters.

But the modest financial incentives are not the driver of the program. Nor to a large extent is the actual lunar soil. NASA is asking for only small amounts — between 50 and 500 grams (or 1.8 ounces to about 18 ounces). While there would be scientific benefits to the mission, it’s really a technology development program, allowing companies to practice extracting resources from the lunar surface and then selling them.

It would also establish a legal precedent that would pave the way for companies to mine celestial bodies in an effort blessed by the U.S. government to help build a sustainable presence on the moon and elsewhere.

To do that, NASA says it needs its astronauts, like the western pioneers, to “live off the land,” using the resources in space instead of hauling them from Earth. The moon, for example, has plenty of water in the form of ice. That’s not only key to sustaining human life, but the hydrogen and oxygen in water could also be used as rocket fuel, making the moon a potential gas station in space that could help explorers reach farther into the solar system.

Asteroids also have significant resources, particularly precious metals that could be used for in-space manufacturing. While the prospect of large mining and manufacturing facilities in orbit is still many years away, NASA wants to use the mining program as a small step toward that goal.

NASA is now trying to return astronauts to the moon under its Artemis program for the first time since 1972. Unlike its predecessor, Apollo, where the astronauts visited the lunar surface for a short while before coming home, the Artemis program would create a permanent presence on and around the moon.

“The ability to extract and utilize space resources is the key to achieving this objective of sustainability,” Gold said. “We must learn to generate our own water, air and even fuel. Living off the land will enable ambitious exploration activities that will result in awe-inspiring science and unprecedented discoveries.”

In 2015, then-President Barack Obama signed a law that allowed private companies the right to own the resources they mined in space. Under the program announced Thursday, NASA said the materials would be transferred from the private companies to NASA.

The effort would not violate the 1967 Outer Space Treaty, NASA officials have said, which prohibits nations from claiming sovereignty over a celestial body. NASA Administrator Jim Bridenstine previously likened the policy to the rules governing the seas.

“We do believe we can extract and utilize the resources of the moon, just as we can extract and utilize tuna from the ocean,” he said earlier this year.

As part of its lunar exploration mission, NASA has been working to get countries around the world to adopt what it calls the Artemis Accords, a legal framework that would govern behavior in space and on celestial bodies such as the moon.

The rules would allow private companies to extract lunar resources and create safety zones to prevent conflict and ensure that countries act transparently about their plans in space, while sharing their scientific discoveries.

The mining announcement came during the same week that China landed a spacecraft on the moon, extracted resources and then lifted off from the lunar surface in an effort to return the sample to Earth.

Instead of developing and sustaining a big government sample-return mission, NASA is taking another approach by partnering with the private sector. “If you step back and think about how really amazing it is that NASA can essentially piggyback on the private-sector space capabilities to perform this mission, it would not have been possible 10 years ago,” said Phil McAlister, the director of NASA’s commercial spaceflight division.

In addition to Lunar Outpost, the other companies chosen for NASA’s program are: ispace Japan and Europe, which would each charge $5,000 for the material; and Masten Space Systems of California, would charge $15,000.

All of the companies would already be on the moon, according to NASA, conducting other missions. McAlister said Lunar Outpost would be ferried to the moon by the lunar lander known as Blue Moon being developed by Jeff Bezos’s Blue Origin. (Bezos owns The Washington Post.) The company later clarified that it was looking at a number of landers to get it to the lunar surface, and not just Blue Origin’s. The ispace companies would fly on a Japanese lander, McAlister said, and Masten, already part of another NASA lunar contract, would use its own Masten XL-1 lander.