
65 Cal.App.2d 196 (1944)
LIBERAL CATHOLIC CHURCH (a Corporation), Appellant,
v.
SARAH PEACOCK ROGERS, Respondent.
Civ. No. 14289. 
California Court of Appeals. Second Dist., Div. Three.  
July 12, 1944.
 Charles A. Thomasset for Appellant.
 Henderson & Churchill for Respondent.
 SHINN, J.
 This proceeding in mandamus was instituted in Los Angeles County and, upon demand and motion of Sarah Peacock Rogers, defendant in said proceeding, was transferred *197 to Ventura County as the county in which said defendant resided at the time the proceeding was instituted. Plaintiff, Liberal Catholic Church, appeals.
 The plaintiff, a corporation, in its petition for a writ of mandamus alleged in substance as follows: that petitioner is a nonprofit corporation with its principal place of business in the city of Los Angeles, county of Los Angeles, whose corporate powers have been exercised by its board of directors, denominated trustees in its articles of incorporation. Prior to November 29, 1941, respondent Sarah Peacock Rogers was elected by said trustees as secretary, treasurer, and registrar of petitioner, and manager of St. Alban Press, under which name petitioner publishes books and literature and disposes of and distributes the same, and that on approximately the 29th day of November, 1941, the said trustees discharged said respondent from all of said offices, declared the same vacant, and elected others to said offices in her place, and respondent has had neither power nor authority to act as such since said date, and that respondent was again discharged from said office in the same manner on approximately June 1, 1943, and the same persons were reelected thereto. That while holding said offices on or about the 29th day of November, 1941, respondent came into possession of certain books, records, property and monies of petitioner appertaining to the holding of said offices, and has withheld the same from petitioner's principal place of business since said date against the consent and without the wish of petitioner. Demand has been made by order of petitioner's board of trustees through its chairman for the return to said principal place of business of all of said personal property on November 29, 1941, and again on June 7, 1943; and on the 7th day of March, 1943, respondent was ordered to return the same by a special convocation of the petitioner. Respondent has at all times failed and refused to turn over said property to her successors in office, and she has no right, title or interest in and to the same. Among the books and papers so held by respondent were certain missals of the reasonable market value of $2,277, which while being so withheld by respondent lost their entire value by reason of being superseded by a later edition, to petitioner's damage in the sum of $2,277.
 It was alleged that petitioner did not know and was unable *198 to state the exact amount and nature of said property withheld by the respondent, although much of it was described in detail, and the petition prayed for judgment against respondent for the return of all of said property, for an accounting as to the same, for the recovery of the sum of $2,277, with interest thereon from November 29, 1941, and for general relief.
 Defendant's demand for change of place of trial was supported by her affidavit that she was a resident of the county of Ventura at the time of the institution of the action and her application was in due form. This showing as to her residence was not controverted. Plaintiff filed a counteraffidavit of the president and chairman of the board of trustees of plaintiff, in which it was stated that defendant was appointed secretary, treasurer, and registrar of plaintiff and manager of St. Alban Press "in the City of Los Angeles, County of Los Angeles, State of California, and accepted and took over said offices in the said city, county and state; that at the time of accepting and taking said offices of secretary, treasurer, registrar and manager of St. Alban Press respondent agreed and promised to abide by the orders and directions of the said board of trustees of petitioner and the members thereof gathered in provincial convocation; that said agreement was made and entered into by respondent in the said City of Los Angeles, County of Los Angeles, State of California," and the affidavit repeated allegations of the petition with reference to demands made upon defendant to return all of the property of plaintiff to it at its headquarters and principal office for the transaction of business in the city of Los Angeles.
 [1a] Under section 395 of the Code of Civil Procedure defendant was entitled to a transfer of the action to the county of her residence unless the instant proceeding was founded on an obligation which she contracted to perform in Los Angeles County, or upon a contract entered into in Los Angeles County. It is the contention of plaintiff that the counteraffidavit of its president proved that defendant entered into a contract to abide by orders duly made and given to her by plaintiff's governing board and officers and that she thereby incurred an obligation to return the property to plaintiff at its office in Los Angeles County. Defendant's answer to this *199 contention is that the proceeding is not founded upon a contract or an obligation arising out of contract but that it is to compel the performance of a duty enjoined by law. We think the trial court did not err in making the order of transfer. It is provided by section 1085 of the Code of Civil Procedure that a writ of mandate may be issued "... to compel the performance of an act which the law specially enjoins, as a duty resulting from an office, trust or station. ..." The action is founded upon defendant's legal duty as a former officer of plaintiff corporation. The claim for damages alleged to have been sustained by reason of defendant's retention of the missals until they had been rendered valueless was purely incidental to the principal remedy sought through the extraordinary writ of mandate. The incorporation of this demand could not change the essential nature of the proceeding. Neither could it be changed by the averments of the counteraffidavit by which it was attempted to substitute as the foundation of plaintiff's cause of action a contract which was in effect no more than a voluntary recognition and affirmance of defendant's legal duties as a former officer of plaintiff. If it should be granted that in some circumstances proof made by affidavit might be controlling in determining the nature of the foundation of the action, where it was not definitely established by the complaint, this could not be true in the instant case where plaintiff has invoked the remedy of mandamus in preference to an action based on the alleged contract. [2] When section 395 of the Code of Civil Procedure speaks of the performance of obligations, it has reference to contract obligations and not to duties imposed by law. [1b] This apparently was conceded by plaintiff when it filed the counteraffidavit setting up the contract. And it is not contended here that the proceeding was improperly transferred to Ventura County if it is founded upon a duty imposed by law and not upon an obligation arising out of contract. It was said in Work v. Associated Almond Growers (1926), 76 Cal.App. 708, 710 [245 P. 790]: "In determining the nature of an action, resort must be had to the averments of the complaint, and the character of the judgment which might be rendered upon a default. (McFarland v. Martin, 144 Cal. 771 [78 P. 239].)" It cannot be questioned that if the proceeding had not been defended and the facts alleged *200 had been proved, a peremptory writ of mandate would have issued commanding defendant to restore to plaintiff the corporate books and records and other property with which she had been entrusted as the secretary and treasurer of plaintiff. This would have compelled the performance of a legal duty, and the question of contract would not have entered into the case as the basis of the recovery or as an element of the proof. The court therefore properly construed the petition as the statement of a cause of action founded upon a legal duty and not upon a contract obligation. [3] The proceeding in mandamus was subject to the same right to a change of place of trial as any other civil action. (Bloom v. Oroville-Wyandotte Irr. Dist. (1939), 34 Cal.App.2d 102 [93 P.2d 164].)
 The order is affirmed.
 Desmond, P. J., and Wood (Parker), J., concurred.
