Short answer. You must return it to the one who actually owns it — but you are not required to decide that yourself. The Civil Code recognizes this exact situation and allows you to bring the matter to court so a judge determines who is entitled to the item. Do not guess and hand it to the wrong person.
What the law says
A deposit may also be made by two or more persons each of whom believes himself entitled to the thing deposited with a third person, who shall deliver it in a proper case to the one to whom it belongs.
Civil Code, Article 1968 — Voluntary Deposit. Read the full provision →
What the Civil Code says about your situation
Article 1968 of the Civil Code directly addresses this scenario. It recognizes that a deposit may also be made by two or more persons each of whom believes himself entitled to the thing deposited with a third person, who shall deliver it in a proper case to the one to whom it belongs. The phrase "in a proper case" is important — it means you hand it over to the rightful owner only after it has been properly determined who that is. The statute does not tell you to guess or to pick the more convincing claimant.
Why you should not decide on your own
The temptation is to hand the item to whoever you believe has a stronger claim — or whoever demands it more insistently. Resist that temptation. If you deliver the item to the wrong person, you may be liable to the true owner for the loss of the item. As a depositary, you hold the item in trust for the rightful claimant. If both parties genuinely dispute ownership, that is a legal question — not one you are equipped or expected to resolve on your own. Handing it to the wrong person out of haste or social pressure does not protect you.
The right move: interpleader
The procedural solution designed for exactly this situation is called interpleader. You — the person holding the item — file a case in court, deposit the item with the court or place it under court control, and effectively say: "Two people claim this. I am not taking sides. Please determine who gets it." The two claimants then litigate their respective rights before the judge. Once the court rules, you deliver to whoever wins. Interpleader protects you from the risk of making the wrong call and being sued twice — once by each claimant.
What you must do in the meantime
While the ownership dispute is unresolved, you are still responsible for the item. Take care of it as a diligent depositary would — protect it from damage, theft, or deterioration. Do not use it yourself, and do not hand it to either claimant informally while litigation is pending. Obtaining legal advice promptly is advisable: the interpleader process involves filing fees and court timelines, and the sooner you act, the less exposed you are. If either claimant threatens you with legal action for refusing to hand it over, that threat itself shows why you are right to wait for a court ruling.