According to the text -- adopted by a rare unanimous vote in the Senate and House of Representatives -- NASA will work toward the goal of "a crewed mission to Mars in the 2030s."
NASA may build ice houses on Mars
The law also highlights the importance of the deep space capsule Orion, which is under development and aims to carry humans further into space than any spaceship ever has.
Orion will be launched atop the "Space Launch System" (SLS), which the space agency has described as the most powerful rocket ever built.
NASA "shall continue the development of the fully integrated Space Launch System, including an upper stage needed to go beyond low-Earth orbit, in order to safely enable human space exploration of the Moon, Mars, and beyond over the course of the next century," said the text.
This law reaffirms "our national commitment to the core mission of NASA," Trump said, signing the text in the presence of numerous elected officials including former Republican rivals, Senator Ted Cruz of Texas and Senator Marco Rubio of Florida.
He saluted the "heroic role" of US astronauts over the last several decades, and called for continued partnerships between NASA and the private sector in the realm of space exploration.
Trump later wrote on Twitter that he was "honoured" to sign the measure.
"With this legislation, we support @NASA's scientists, engineers, and astronauts in their pursuit of discovery!" he wrote.
Scientists enter Hawaii dome in eight-month Mars space mission study
Former president Barack Obama also hailed these industry-government partnerships, and said in October, just months before leaving office, that the United States had "set a clear goal vital to the next chapter of America's story in space: sending humans to Mars by the 2030s and returning them safely to Earth."
Experts say that sending people to live on the Red Planet, which lies on average some 140 million miles (225 million kilometres) away from Earth, will take immense amounts of technological advances and cash.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ