Who owns Mars? Despite the common ownership principles of the Moon Treaty ("Agreement Governing the Activities of States on the Moon and Other Celestial Bodies") that nations that make space launches have declined to ratify, if a private company were the first to reach Mars and set up a community of humans on Mars that persisted over time, it would almost surely be treated as owning the land the community sat on and a radius of a few kilometers around that community that the community regularly used. This is especially true if it took the precaution of having its settlement of and claim to that piece of Mars officially sponsored by a small Caribbean island recognized as a sovereign nation by the UN that had not signed the Moon Treaty.
John Locke explains the relevant part of natural law in section 30 of his 2d Treatise on Government: “Of Civil Government” (Chapter V "Of Property"):
Thus this law of reason makes the deer that Indian’s who hath killed it; it is allowed to be his goods, who hath bestowed his labour upon it, though before it was the common right of every one. And amongst those who are counted the civilized part of mankind, who have made and multiplied positive laws to determine property, this original law of nature, for the beginning of property, in what was before common, still takes place; and by virtue thereof, what fish any one catches in the ocean, that great and still remaining common of mankind; or what ambergrease any one takes up here, is by the labour that removes it out of that common state nature left it in, made his property, who takes that pains about it. And even amongst us, the hare that any one is hunting, is thought his who pursues her during the chase: for being a beast that is still looked upon as common, and no man’s private possession; whoever has employed so much labour about any of that kind, as to find and pursue her, has thereby removed her from the state of nature, wherein she was common, and hath begun a property.
The step of getting sponsorship from a small Caribbean island nation that had not signed the Moon Treaty may seem as if it makes it a matter of ordinary international law rather than just natural law. But what it does is simply to ensure that the law of nature applies. As John Locke writes in section 14, even in his day and ours, rulers are still in the law of nature:
It is often asked as a mighty objection, where are, or ever were there any men in such a state of nature? To which it may suffice as an answer at present, that since all princes and rulers of independent governments all through the world, are in a state of nature, it is plain the world never was, nor ever will be, without numbers of men in that state. I have named all governors of independent communities, whether they are, or are not, in league with others ...
In the more immediate future, if a private company mined a metallic near-earth asteroid and brought some of the more valuable metals back to earth, there would be a great deal of sentiment that the company ought to be able to claim title to those metals and sell them. The way US law is going, it should be easy for a company to get sponsorship of the US for this. John Locke would call that sentiment the law of nature.
On the other hand, if a company that was mining a small portion of an asteroid tried to claim the whole asteroid, or even more clearly, if the company that had set up a community at one spot on Mars tried to claim the whole planet, that would seem like overreaching. John Locke explains why: if only a small part of the asteroid is being mined or only a small part of Mars has been settled, then the rest seems still to be a part of the commons.
Of course, people and groups of people often do claim ownership of something in the commons that is much larger than they are actually able to use. But that ends up seeming unfair. The exception is if something close to the entire set of people currently exploiting the commons resource become part of a formal or informal agreement about the use of the resource. Elinor Ostrom won a Nobel prize for studying how communities of exploiters regulate the exploitation of commonly held resources. One important incentive for setting up such a system is to convince oneself and others that additional people who want to join the group of exploiters can be excluded from use of that resource.
All existing title to something that was not made by humans in the first place goes back to some original moment of appropriation. For most things on the Earth, the moment of appropriation from nature was many years ago. But for the asteroids, moons and planets, many of those alive will witness the moment of appropriation from nature.
Don't miss other John Locke posts. Links at "John Locke's State of Nature and State of War."