[Civ. No. 1627.

Fifth Dist.

Mar. 28, 1973.]

#### MELVIN W. MAGNUS, Plaintiff and Appellant, v. BILL J. JACKSON, as Auditor-Controller, etc., Defendant and Respondent.

*400Counsel

Stanley Simrin for Plaintiff and Appellant.

Ralph B. Jordan, County Counsel, and D. N. Reid, Deputy County Counsel, for Defendant and Respondent.

Opinion

FRANSON, J.

Appellant appeals from an order of the superior court denying his petition in mandate to compel respondent to pay him $1,616.91 for-legal services rendered in representing two indigent criminal defendants.

Appellant, an attorney, was appointed by the superior court on two occasions to represent indigent criminal defendants. He handled each case through sentencing. By reason of “inadvertence and neglect” he did not file with the court a statement of his services until approximately *41⁄2*months after completion of his services. The court fixed the reasonable value thereof in the amounts of $746.91 and $870. Upon presentation to respondent of his claims for payment, the claims were rejected on the *401ground that they were not timely filed within the one-year period as provided in Government Code section 911.2.

The question is whether appellant is entitled to payment from the county for his services as fixed by the court, even though he failed to file his claims with the county within one year from the date of the last service performed. We hold that he is.

Government Code section 911.2 provides that a claim relating to any cause of action (other than for death or for injury to person or to personal property or growing crops) shall be presented to the public entity *“not later than one year after the accrual of the cause of action.”*(Italics added.)

Penal Code section 987.2 (formerly Pen. Code, § 987a) provides that assigned counsel “shall receive a reasonable sum for compensation and for necessary expenses *the amount of which shall be determined by the court,*to be paid out of the general fund of the county.” (Italics added.)

Penal Code section 987.2 does not require a court order for payment of services, but only that the amount shall be fixed by the court.

Generally a cause of action accrues and the statute of limitations starts to run when the cause of action is complete and the party has a right to sue. *(Maguire*v. *Hibernia S. & L. Soc.,*23 Cal.2d 719, 733 [146 P.2d 673, 151 A.L.R. 1062].) This means simply that when an obligation is conditional on the happening of an event, the event must occur before a cause of action arises to enforce the obligation.

In *A. Teichert & Son, Inc.*v. *State of Cal.,*238 Cal.App.2d 736 [48 Cal.Rptr. 225], it was held that a cause of action upon a state construction contract did not accrue against the state until nonjudicial remedies incorporated by reference into the contract had been completed. The reviewing court relied upon the doctrines of exhaustion of administrative and contract remedies in noting that the statute of limitations is suspended during the pendency of proceedings forming a necessary prelude to the lawsuit.

Appellant performed services pursuant to a statute (Pen. Code, § 987.2) which imposes as a condition of payment that the appointing court fix the value of his services. Until this was done, appellant had no cause of action against the county for payment of his services. Only when the court fixed the value of his services did a cause of action for payment accrue on his behalf.

Respondent’s contention that appellant’s cause of action accrued and the statute of limitations commenced running on the date he completed his services must fall in the face of the clear language of Penal Code section 987.2.

*402We hold that appellant’s claims were timely filed. Respondent’s duty to pay appellant is a ministerial duty of his office. Mandate lies to compel payment. (Code Civ. Proc., § 1085; see *Luke*v. *County of Los Angeles, 269*Cal.App.2d 495 [74 Cal.Rptr. 771].)

The order denying mandamus is reversed with directions to issue the writ as prayed. Appellant to recover his costs on appeal.

Gargano, J., concurred.

Brown (G. A.), P. J., deeming himself disqualified, did not participate.

Respondent’s petition for a hearing by the Supreme Court was denied June 13, 1973. McComb, J., and Burke, J., were of the opinion that the petition should be granted.