
60 Cal.App.2d 616 (1943)
I. B. GAYER, Respondent,
v.
THOMAS WHELAN, as District Attorney, etc., Appellant.
Civ. No. 2867. 
California Court of Appeals. Fourth Dist.  
Sept. 28, 1943.
 Thomas Whelan, District Attorney, in pro. per., and Duane J. Carnes, Deputy District Attorney, for Appellant.
 Arthur Mohr, Ralph E. Swing, Swing & Swing, Charles W. Lyon and Morris Lavine for Respondent.
 GRIFFIN, Acting P. J.
 The original proceeding herein was an action in which plaintiff sought to recover 14 pin-ball machines which defendant, in his capacity as District Attorney of San Diego County, had seized and proposed to destroy under the provisions of section 335a of the Penal Code. The action was decided in favor of plaintiff. (See Gayer v. Whelan, 59 Cal.App.2d 255 [138 P.2d 763].)
 Defendant and appellant, as District Attorney of San Diego County, now moves to recall the remittitur in this action, issued August 17, 1943, because of a provision therein awarding costs to respondent. The motion is predicated upon the theory that at the time of the issuance of the remittitur there was no provision in the law awarding costs against the state or county, and that inasmuch as defendant was acting in his *618 capacity as District Attorney of San Diego County, he too was immune from the payment of costs on the same theory.
 [1] It is a general rule that the prevailing party on an appeal shall be entitled to his costs as an incident of the judgment on appeal. (Sec. 1034 Code Civ. Proc.; rule 26, Rules on Appeal.)
 Section 1028 of the Code of Civil Procedure, as it existed prior to amendment in 1943, provided that "When the State is a party and costs are awarded against it, they must be paid out of the State treasury." And as amended in 1943 (Stats. 1943, chap. 165, sec. 1) it provides that "Notwithstanding any other provisions of law, when the State is a party, costs shall be awarded against it on the same basis as against any other party and, when awarded, must be paid out of the appropriation for the support of the agency on whose behalf the State appeared."
 Section 1029 of the Code of Civil Procedure was not similarly amended. It still provides that when a county is a party, and costs are awarded against it, they must be paid out of the county treasury.
 Construing section 1028, supra, as it existed prior to the 1943 amendment, it has been held that ordinarily costs are not allowed against the State in the absence of express statutory legislation, and section 1038 (now 1028) of the Code of Civil Procedure, which provides that when the state is a party and costs are awarded against it, they must be paid out of the state treasury, does not authorize the imposition of costs in any case, but merely specifies the source from which they shall be paid when authorized by statute; and that in a proceeding for forfeiture of an automobile used for unlawful transportation of narcotics, that it is improper to allow costs against the state in the absence of statutory authorization. (People v. One Plymouth Sedan, 21 Cal.App. 2d 715 [69 P.2d 1011].) To the same effect is People v. One 1937 Plymouth Six, 40 Cal.App.2d 38 [104 P.2d 372].
 In Innes v. McColgan, 52 Cal.App.2d 698 [126 P.2d 930], this court held that under section 1034 of the Code of Civil Procedure the state is entitled to costs where it is the prevailing party, though costs could not have been awarded against it had the other party prevailed, and that permission to sue the state is in the nature of an offer which must be accepted as made and that if a statute merely gives permission to sue the state through its officers acting in their official capacity, *619 the action so authorized is subject to existing statutes and rules applicable to such a form of action.
 [2] The county enjoys the same immunity from suit and from liability as the state. (City of Los Angeles v. County of Los Angeles, 9 Cal.2d 624, 629 [72 P.2d 138, 113 A.L.R. 370]; Whittaker v. County of Tuolumne, 96 Cal. 100 [30 P. 1016].) Appellant argues that the district attorney is a state officer acting in his official capacity, and that as such he is not subject to the imposition of costs of litigation, citing Gamble v. Utley, 86 Cal.App. 414 [260 P. 930]; Fleming v. Hance, 153 Cal. 162 [94 P. 620]; Singh v. Superior Court, 44 Cal.App. 64 [185 P. 985].)
 It was held in the Gamble case that the district attorney was a constitutional officer, as applied to the facts of that case; in the Fleming case that he was a public officer representing the sovereign power of the people of the state; and in the Singh case that although he was a county officer, he was a part of the political organization which is an agency of the state, and therefore an executive officer of the state, within the meaning of section 67 of the Penal Code. The last case mentioned did not directly hold that the district attorney was a state officer, but held in view of the fact that the Legislature did not make any provision relating to the bribing of an executive county officer, as distinguished from an executive state officer, the term executive officer of the state was all inclusive. [3] In the instant controversy, the Legislature did distinguish between a state and a county officer in adopting two separate sections in respect to costs. Section 1028 applies to costs when the state is a party and section 1029 applies to costs when a county is a party. It therefore seems only reasonable, under section 1029, that it was intended that the office of the district attorney, for the purpose of determining the question here presented, would fall in the classification of a county officer. Therefore, the 1943 amendment to section 1028 is not applicable where only the county is a party or its officers acting in their official capacities.
 [4] Construing section 1029, supra, as applied to the facts related, and in harmony with the cited decisions, we must conclude that if the district attorney was not acting in his individual capacity or right but in that of the county of San Diego, and the county was the real party in interest, then, no costs may be imposed against such county, acting through its authorized agent, unless authorized by express statutory legislation. (People v. One Plymouth Sedan supra.) *620
 Sections 509 to 521 of the Code of Civil Procedure, pertaining to actions for claim and delivery, contain no express statutory legislation allowing costs against the county or its authorized agent. In Lamberson v. Jefferds, 116 Cal. 492 [48 P. 485], a question arose as to a county officer being held liable for costs in an action involving the legality of a claim against the county, wherein the auditor refused to allow the claim which had been approved by the board of supervisors. It was there held that the county auditor, in refusing to issue a warrant, was acting for the county but if the county auditor refused to issue a warrant improperly, and where there was no just cause to doubt the validity of the claim, he would have no just claim against the county for reimbursement, and he may therefore "be justly cast in costs."
 In the instant case the plaintiff himself instituted the original proceeding and brought it against Thomas Whelan, not as an individual, but against him in his official capacity as District Attorney of San Diego County. It was in this official capacity that he answered the complaint and judgment went against him as such district attorney. It was only in that capacity that he could and did appeal. He apparently was not acting therefor in his own individual right, but in that of the county. It cannot be here said that in taking and retaining the property in question he was acting arbitrarily. He apparently was acting in good faith, fully believing that he was within his legal rights as such public officer in so doing. This conclusion is strengthened by the fact that the Supreme Court itself, by a divided vote of four to three, denied a hearing in the decision of this case on its merits. In this action, the county was not liable for costs nor was the district attorney in his official capacity as such. (Scheerer v. Edgar, 67 Cal. 377 [7 P. 760]; Lamberson v. Jefferds, supra.)
 It is therefore ordered that the remittitur be recalled; that the sentence "The respondent to recover costs on appeal" be stricken out; and, as so changed, that the remittitur be returned to the trial court.
 Marks, J., concurred.
