Chapter 9. Costs of California Elections Code >> Division 16. >> Chapter 9.

If the proceedings in a general election contest under this division are dismissed for insufficiency or for want of prosecution, or the election is confirmed by the court, judgment for costs shall be rendered against the contestant and in favor of the defendant. If the election is annulled or set aside on the ground of errors of a precinct board in conducting the election or in canvassing the returns, the costs shall be a charge against the county or city where the election was held. When the election is annulled or set aside on any other ground, judgment for costs shall be given in favor of contestant and against the defendant.
Where two or more contested elections are joined for the purpose of recounting votes, the costs shall be apportioned among the parties in the discretion of the court.
Primarily each party is liable for the costs created by himself or herself to the officers and witnesses entitled thereto, which costs may be collected in the same manner as similar costs are collected in other cases.
The provisions relating to costs in contested final elections apply to primary election contests conducted under this division.