In 2016, SpaceX CEO Elon Musk outlined a plan to send human colonists to Mars. As of today, the human population of Mars stands at zero. (The rover population, meanwhile, has climbed to three.)

Colonizing the Red Planet certainly won’t be easy, and if it ever happens, it probably won’t be until the 2030s. But if Musk has his way, he’ll set up a permanent home for humanity on our inhospitable neighbor, and that opens up some intriguing legal questions.

Mars belongs to everybody, according to the Outer Space Treaty, which the US signed back in 1967. The treaty says nobody can own a celestial body. How might that affect Musk’s plans?

Can you do whatever you want in space?

There’s nothing in the space treaties that would stop Musk and his followers from going to Mars, says Frans von der Dunk, who studies space law at the University of Nebraska-Lincoln. Private companies are perfectly free to set out for Mars, build permanent habitats, and start a new society there—just as long as that society follows the rules of the Outer Space Treaty. For example, colonists can’t deploy weapons of mass destruction (sorry, Elon), and they can’t claim to own the land they’re on.

“Their activities on Mars shouldn’t interfere with activities of others in space,” says von der Dunk.

Who’s in charge once there’s a human population on Mars?

Although Musk’s hypothetical colony wouldn’t legally be an American colony, it would still be subject to American laws. That’s because even if the Mars mission launches from Kazakhstan or French Guiana, SpaceX is an American company and the colonists would be traveling on an American ship.

Maritime laws provide a good example of the type of legal system we could expect on the Red Planet. Like international waters, nobody can own Mars, so instead each ship needs to follow the rules of the country whose flag it flies under. And, just like sailors, Mars explorers are still expected to abide by those rules even when they’re off the ship.

[Related: Inside NASA’s plan to use Martian dirt to build houses on Mars]

Things get a little more complicated once you start adding other countries and companies into the Martian mix. On the International Space Station, for example, if an American astronaut were to hit a Russian astronaut over the head, first the US would have the right to determine whether a criminal act was committed. If the US doesn’t take action, then he could be tried under Russian jurisdiction.

In addition, any sizable, long-term colony on Mars is also going to need a local governing system. What form of government might or should take shape there? We’ll leave that discussion up to the political scientists.

Mars astronauts picking up red rock samples in front of a Martian colony against a purple sky. Illustration.
This 1985 artist’s concept depicts the hardware NASA astronauts might use on a crewed mission to the Red Planet. It shows Pavonis Mons, a large shield volcano on Mars’ equator overlooking the ancient water eroded canyon in which the base is located. Hardware seen here include the Mars explorer, a traverse vehicle, a habitation module, a power module, greenhouses, central base, lightweight crane and trailer, launch and landing facility, water well pumping station, a maintenance garage, tunneling device, water well drilling rig, large dish antennae, mast antenna, even a Mars airplane. Pat Rawlings / NASA

Does Musk need permission to colonize Mars?

Currently, if you want to launch a rocket into space, you have to ask the government for permission. Then, depending on your activities in space, you have to apply for a second license to do specific things. For example, if you’re launching a telecom satellite, you’ll want to talk to the Federal Communications Commission.

However, as of yet “there is no license specifically for dealing with the legal implications of space colonization,” says von der Dunk. In fact, it’s not even clear which office would be in charge of giving out those licenses. NASA? The Federal Aviation Administration? A whole new branch of the government?

[Related: SpaceX’s all-civilian moon trip has a crew]

As the number of companies wanting to carry tourists into space increases, the government is going to need to figure out a licensing procedure soon.

Why bother enforcing Earth laws on another planet?

We’re supposed to avoid contaminating the celestial bodies that we explore, according to the Outer Space Treaty. Not only does that mean “don’t spread trash all over the solar system,” but it’s generally interpreted to mean “keep your microbes to yourself,” too.

If Earth microbes take root on Mars or Europa, we may never have the chance to find out if those worlds ever hosted alien life. So the major space agencies have a sort of “gentleman’s agreement,” says von der Dunk, to decontaminate their spacecraft as much as possible before sending them to other worlds. But human bodies are much harder to decontaminate, since our health depends on our microbes.

There a few sites on Mars that are considered deserving of heavier protection than others—areas where liquid water is thought to exist, for instance. Only the most thoroughly decontaminated vessels are supposed to enter those areas.

Will Elon Musk and his followers be expected to follow those same planetary protection “gentleman’s agreements”? The licensing process, mentioned above, could determine whether potential colonizers will be legally bound to avoid spreading their germs all over Mars.

“The US licensing process should make sure that the activities of Elon Musk and others do not violate key principles of planetary protection,” says von der Dunk. “The US has the power to make those binding of Elon Musk and whoever flies under his flag.”

[Related: Your ancestors might have been Martians]

As companies prepare to mine asteroids and other bodies in the coming years, the government will need to set up a licensing procedure for that as well. It’s unclear whether those companies would be held to strict planetary protection guidelines, but asteroid mining licensing could pave the way in making it easier (or harder) to include planetary protection in the guidelines for building settlements on other worlds.

“If the companies want to be seen as good citizens, and consider them fair requirements, it will be an easy thing,” says von der Dunk. “But if they find planetary protection totally obstructive or heavy in cost and start protesting this, that will then have to be sorted out–or maybe fought out.”

This story has been updated. It was originally published on September 27, 2016.