Short answer. Under the Civil Code, the costs of litigation over the property are borne by every possessor — whether he turns out to have possessed in good faith or in bad faith. Litigation expense is treated as a burden of possession itself, not as an expense the losing owner reimburses.
What the law says
The costs of litigation over the property shall be borne by every possessor.
Civil Code, Article 550 — Costs Of Litigation Borne. Read the full provision →
Why the possessor carries this particular expense
The Civil Code spends several articles sorting out who pays for what when a possessor has to give property back to its owner. Necessary expenses for preservation are refundable to any possessor. Useful improvements are treated one way for a possessor in good faith and another for one in bad faith. Expenses for pure luxury or mere pleasure follow yet another rule. Article 550 pulls litigation costs out of that scheme entirely and assigns them to every possessor, with no distinction between good faith and bad. Defending your hold on the property is treated as something you do for yourself, not as an expense incurred for the benefit of the true owner.
What 'costs of litigation over the property' means here
This is about the expense of the suit itself — the cost of prosecuting or defending the action in which possession is contested. It is a rule of substantive law about reimbursement between the possessor and the owner, and it means the possessor cannot add his litigation expense to the list of things he demands back before surrendering the property. It is a separate matter from the procedural award of costs that a court makes between the winning and losing parties at the end of a case, and separate again from attorney's fees, which are recoverable only in the specific situations the Civil Code allows.
The practical sting: no retention for litigation expense
A possessor in good faith may, in the proper case, hold on to the property until he is reimbursed for the expenses the law allows him to recover. That right of retention is real leverage. Article 550 keeps litigation costs out of that leverage. A possessor cannot refuse to vacate on the ground that he spent heavily on lawyers, and adding legal fees to a demand for reimbursement invites the demand to be rejected in part. Anyone budgeting for a possession case should therefore treat the legal expense as money that is not coming back from the other side.
Before you spend on a possession fight
Get clear at the outset on which action you are in — recovery of physical possession, recovery of the right to possess, or recovery of ownership — because they differ in court, in period, and in what must be proved. Separate the expenses you genuinely can claim, such as necessary repairs and taxes paid to preserve the property, and keep receipts for those in a file of their own; a claim mixed together with legal fees is harder to sustain. Consider early whether the dispute can be settled, since in a long possession case the irrecoverable litigation expense can quietly exceed the value of what is being fought over. This is general legal information, not advice on your own case.