Flanked at an Oval Office bill-signing ceremony by astronauts and lawmakers, Trump observed that being an astronaut is a "pretty tough job." He said he wasn't sure he'd want it and, among lawmakers he put the question to, Sen. Ted Cruz said he wouldn't want to be a space traveler, either.

But Cruz, R-Texas, offered up a tantalizing suggestion. "You could send Congress to space," he said to laughter, including from the president.

Trump, who faces a crucial House vote later this week on legislation long promised by Republicans to overhaul the Obama-era Affordable Care Act health law, readily agreed. The health care bill is facing resistance from some conservative members of the party.

"What a great idea that could be," Trump said, before turning back to the space exploration measure sponsored by Cruz and Sen. Bill Nelson, D-Fla.

The new law authorizes $19.5 billion in spending for the National Aeronautics and Space Administration for the budget year that began Oct. 1. Cruz said the authorization bill is the first for the space agency in seven years, and he called it a "terrific" achievement.

Trump last week sent Congress a budget proposal that seeks $19.1 billion in spending authorization for the agency next year.

"For almost six decades, NASA's work has inspired millions and millions of Americans to imagine distant worlds and a better future right here on earth," Trump said. "I'm delighted to sign this bill. It's been a long time since a bill like this has been signed, reaffirming our commitment to the core mission of NASA: human space exploration, space science and technology."

The measure amends current law to add human exploration of the red planet as a goal for the agency. It supports use of the International Space Station through at least 2024, along with private sector companies partnering with NASA to deliver cargo and experiments, among other steps.

After signing the bill, Trump invited several lawmakers to comment, starting with Cruz. When Trump invited Vice President Mike Pence to speak, he suggested that Nelson be allowed to say a few words. Nelson traveled into space when he was in the House.

"He's a Democrat. I wasn't going to let him speak," Trump quipped, to laughter. Nelson ultimately got a chance to briefly praise his bill.

Pence also announced that Trump plans to re-launch the National Space Council, with Pence as chairman, to coordinate U.S. space policy. The council was authorized by law in 1988, near the end of the Reagan administration, but ceased to operate soon after Bill Clinton took office in January 1993.