Article 378 [source]

Spanish Criminal Code
English translation

Payments made by a person convicted of one or more of the offenses referred to in Articles 361 to 372 shall be allocated in the following order:

1. To the reparation of the damage caused and compensation for losses.

2. To the compensation to the State for the amount of expenses incurred on its behalf in the case.

3. To the fine.

4. To the costs of the private prosecutor when their payment is ordered in the judgment.

5. To all other procedural costs, including those of the defendant's legal counsel, without preference among the interested parties.