
23 Cal.Rptr.3d 154 (2004)
125 Cal.App.4th 907
Steve WESTLY, Petitioner,
v.
The SUPERIOR COURT of San Diego County, Respondent;
Candace Cates, Real Party in Interest.
Bill Lockyer, Petitioner,
v.
The Superior Court of San Diego County, Respondent;
Candace Cates, Real Party in Interest.
Nos. D045075, D045076.
Court of Appeal, Fourth District, Division 1.
October 28, 2004.
*155 Bill Lockyer, Atty. Gen., Louis R. Maura, Senior Asst. Atty. Gen., Kenneth R. Williams, Christine M. Murphy and Zackery P. Morazzini, Deputies Atty. Gen., for Petitioner Steve Wesley.
Bill Lockyer, Atty. Gen., Tom Greene, Chief Asst. Atty. Gen., Robert L. Mukia, Senior Asst. Atty. Gen., Sara J. Drake, Christine M. Murphy and Kathleen E. Gnekow, Deputies Atty. Gen., for Petitioner Bill Lockyer.
No appearance for Respondent.
Manuel Corrales and Ronquillo and Corrales, San Diego, for Real Party in Interest.
McCONNELL, P.J.

FACTUAL AND PROCEDURAL BACKGROUND
Candace Cates, an enforcement officer with the California Division of Gambling Control, filed a taxpayer's action for injunctive and declaratory relief against Controller Steve Westly, Attorney General Bill Lockyer and the Gambling Control Commission to require them to collect money which belongs to the state under the 1999 compacts mandating that certain revenue from tribal casinos be deposited into the state's Special Distribution Fund. As Cates represents it, the complaint alleges the tribes are not paying the agreed-upon share and the Controller, Attorney General and Gaming Control Commissioners are not fulfilling their statutory duties to collect or require the tribes to account for the money.
The Controller and Attorney General moved for summary judgment on grounds that their offices are not responsible for collecting or accounting for contributions to the Special Distribution Fund because former Governor Davis delegated that responsibility to the California Gambling Control Commission by Executive Order No. D-66-03. After the motion was filed, Cates served deposition notices on Controller Westly, Attorney General Lockyer and others. The defense requested that Cates withdraw the notices for the Controller and Attorney General because they are top government officials and not subject to deposition. Cates refused.
The Controller and Attorney General moved for a protective order that their depositions not be taken. The court issued a tentative ruling denying the motion, stating:
"The issue which would be the subject of the depositions is whether the Attorney General and/or the Controller have a duty to collect funds from the Tribes *156 owed to State under the Compacts, and if so, what steps have they taken, or not taken, to collect the funds. This is a material issue to this case.
"Mr. Lockyer has already submitted a declaration based upon his personal knowledge in support of the motion for summary judgment. No other source would be available to testify as to Mr. Lockyer's personal knowledge.
"Mr. Korach of the Office of the State Controller has submitted his declaration based upon his personal knowledge about the duties of the State Controller. However, Mr. Korach is not the State Controller but rather one of the Controller's chief officers. Mr. Korach has been in that position for only 1 year and 3 months. Mr. Westly would likely be in a better position to know the duties of the Office of the State Controller.
"Both Mr. Lockyer and Mr. Westly would have personal knowledge of their respective offices' authority and duties.
"Issuance of a protective order would also work an injustice and cause prejudice to [Cates], particularly as to Mr. Lockyer. Defendants seek to have it both ways, using Mr. Lockyer's testimony to support their summary judgment motion but seeking to preclude [Cates] the opportunity to examine Mr. Lockyer on the statements made in his declaration."
At the argument on September 3, 2004, the court confirmed the tentative ruling.
The Controller and Attorney General followed with writ petitions. We stayed the depositions and requested a response.

DISCUSSION
The general rule in California and federal court is that agency heads and other top governmental executives are not subject to deposition absent compelling reasons. (Nagle v. Superior Court (1994) 28 Cal.App.4th 1465, 1467-1468, 34 Cal. Rptr.2d 281; Deukmejian v. Superior Court (1983) 143 Cal.App.3d 632, 633, 191 Cal.Rptr. 905; State Board of Pharmacy v. Superior Court (1978) 78 Cal.App.3d 641, 644-645, 144 Cal.Rptr. 320; Church of Scientology of Boston v. IRS (D.Mass. 1990) 138 F.R.D. 9, 12.) The rule applies to officials summoned to testify as third parties as well as those who are named defendants. (State Board, of Pharmacy v. Superior Court, supra, 78 Cal.App.3d at p. 643, 144 Cal.Rptr. 320; Nagle v. Superior Court, supra, 28 Cal.App.4th at p. 1468, 34 Cal.Rptr.2d 281.)
"The general rule is based upon the recognition that `... an official's time and the exigencies of his everyday business would be severely impeded if every plaintiff filing a complaint against an agency head, in his official capacity, were allowed to take his oral deposition. Such procedure would be contrary to the public interest, plus the fact that ordinarily the head of an agency has little or no knowledge of the facts of the case.'" (Nagle v. Superior Court, supra, 28 Cal.App.4th at p. 1468, 34 Cal.Rptr.2d 281.) An exception to the rule exists only when the official has direct personal factual information pertaining to material issues in the action and the deposing party shows the information to be gained from the deposition is not available through any other source. (Ibid., citing Church of Scientology of Boston v. IRS, supra, 138 F.R.D. at p. 12.)
Controller Westly and Attorney General Lockyer are named in this action in their official capacities and charged with violating their statutory duties to collect or require the tribes to account for certain money. While the Controller and Attorney General unquestionably have knowledge of what their official duties are, those *157 duties are a matter of law, not personal factual information. Controller Westly and Attorney General Lockyer fall squarely within the general rule.
The superior court's reliance on the declarations filed in support of the summary judgment motion in denying the protective orders is misplaced. Chief Korach of the Controller's Division of Accounting and Reporting submitted a declaration in support of summary judgment, but Controller Westly did not file a declaration or otherwise indicate any involvement in the issues in the case. Under these circumstances, the general rule applies to Controller Westly. The court's concerns  discomfort with the length of time that Chief Korach has served in his present post and a belief that Controller Westly would be in a better position than Chief Korach to know the duties of the office  are speculative at best and unenlightening on the critical issue of whether the information may not be available through any other source: they certainly create no "compelling reason" for allowing the Controller's deposition to go forward.
Unlike Controller Westly, Attorney General Lockyer did submit a declaration in support of the summary judgment motion which, as the trial court correctly noted, purported to be based on personal knowledge. However, while we share the trial court's displeasure at allowing the Attorney General to file a declaration in support of summary judgment while depriving Cates of the opportunity to examine him on statements in his declaration, the declaration without more does not take the Attorney General out of the general rule.
Attorney General Lockyer's declaration addresses the statutory and constitutional duties of the office and contains legal conclusions. However, other than the dates of the Attorney General's term, it contains no factual information. The failure to raise any genuine issues of fact limits the utility of the declaration on summary judgment and defeats any legitimate reason for the deposition.
We conclude the court abused its discretion in denying the protective orders on the record before it. Because there are no disputed factual issues, the legal error is clear and the matter should be expedited, a peremptory writ in the first instance is appropriate. (Code Civ. Proc., § 1088; Ng v. Superior Court (1992) 4 Cal.4th 29, 35, 13 Cal.Rptr.2d 856, 840 P.2d 961.)

DISPOSITION
Let a peremptory writ of mandate issue directing the superior court to vacate its September 3, 2004, ruling and enter protective orders precluding the depositions of Controller Westly and Attorney General Lockyer. This opinion is made final immediately. (Cal. Rules of Court, rule 24(b)(3).) The stay issued on September 23, 2004, is vacated. The parties are to bear their own costs in the writ proceeding.
WE CONCUR: IRION and AARON, JJ.
