For the first time in more than six years, both chambers of Congress approved the bill that will make over $19 billion dollars available to the space agency.
The Nasa Transition Authorisation Act of 2017 includes existing programs such as maintaining and advancing the International Space Station (ISS) and sending astronauts to low-earth orbit.
The bill has also provided provisions for the agency's more ambitious plans such as Mars exploration and deep space exploration.
According to sources, there was no vocal opposition to the bill.
The 146-page bill calls for Nasa to formulate a roadmap to "extend humanity's reach into deep space, including cis-lunar space, the Moon, the surface and moons of Mars, and beyond."
The bill also asks for a plan to carry out a Mars human spaceflight mission by the year 2033.
The document says that not later than 120 days after the date of the enactment the act, the Nasa Administration shall contract with an independent, non-governmental systems engineering and technical assistance organization.
Recruiting such an organization will help Nasa study a Mars human spaceflight mission to be launched in 2033.
The bill also urges the space agency to continue developing the Orion space capsule for deep space exploration in the future.
Nasa is also expected to continue working on the Space Launch System (SLS), a powerful rocket that will launch astronauts in the agency's Orion spacecraft.