President Trump waves alongside Apollo 17 astronaut Jack Schmitt, third from right, and NASA astronaut Peggy Whitson. second from right, after a signing ceremony last December for Space Policy Directive 1, which aims to return Americans to the moon. (Saul Loeb/AFP/Getty Images)

President Trump floated the idea adding a “space force” to the country's military in a speech Tuesday at Miramar Air Station in San Diego.

“My new national strategy for space recognizes that space is a war-fighting domain, just like the land, air and sea,” Trump told the crowd of Marines. “We have the Air Force. We’ll have the space force.”

Initially, Trump explained, he'd proposed the idea as a joke. “Then I said, 'What a great idea, maybe we'll have to do that.'”

He did not specify Tuesday whether he was still joking.

The Outer Space Treaty, which the United States signed in 1967, bars states from testing weapons and establishing military bases on the moon and other celestial bodies. It also prohibits the placement of weapons of mass destruction in orbit around Earth.

Critics have pointed out that, since the treaty has no enforcement mechanism, nothing is really stopping a president or anyone else from militarizing space. (The U.S. Air Force has an unmanned space plane, the X-37B, which has completed several clandestine missions.) Still, the voluntary agreement has managed to prevent war in space for the past 51 years.

The United States does have a National Aeronautics and Space Administration, which has, among other things, landed 12 American astronauts on the moon.

NASA has been without a permanent administrator since Trump's inauguration 14 months ago. In April, it will also lose its acting administrator, Robert Lightfoot, who announced his retirement Monday.

Read more:

Trump nominates Oklahoma politician and climate skeptic to run NASA

Bill Nye was a Trump nominee's guest at the State of the Union. Scientists were not amused.

NASA’s acting administrator to retire without a clear successor