Answer
When the same thing is sold to two different buyers, Article 1544 of the Civil Code decides who owns it. For movable property, ownership goes to the buyer who first takes possession in good faith. For immovable (real) property, ownership belongs, in order: (1) to the buyer who first registers the sale in good faith; (2) if there is no registration, to the buyer who first takes possession in good faith; and (3) if there is neither registration nor possession, to the buyer who presents the oldest title, provided he acted in good faith.
Good faith is essential at every level — a buyer who knew of the earlier sale cannot defeat the first buyer merely by registering first. This rule protects a diligent, good-faith buyer and is a frequent issue in real-estate disputes.