
88 Cal.Rptr.2d 641 (1999)
74 Cal.App.4th 1249
FONTANA POLICE DEPARTMENT, Plaintiff and Respondent,
v.
Pedro A. VILLEGAS-BANUELOS, Defendant and Appellant.
No. E023958.
Court of Appeal, Fourth District, Division Two.
August 31, 1999.
As Modified September 30, 1999.
Review Denied November 10, 1999.
*642 Adam Axelrad, Robert Mann and Donald W. Cook, Los Angeles, for Defendant and Appellant.
Rinos, Shephard & Martin, LLP, Santa Ana, and Tiffany J. Israel, for Plaintiff and Respondent.

OPINION
McKINSTER, Acting P.J.
This is an appeal from a trial court's order denying the request of Pedro Villegas-Banuelos (appellant herein and respondent below) for attorney's fees under the pertinent provision of the California Public Records Act (Gov.Code, § 6250, et seq.). Appellant requested the fees after the Fontana Police Department (petitioner below and respondent herein) refused to produce two tape recordings of telephone communications between Fontana and another law enforcement agency unless appellant agreed to stipulate to two conditions: (1) that certain portions of the tapes that Fontana considered embarrassing and irrelevant could be edited out; and (2) that appellant would not disseminate the tapes. Appellant requested the tape recordings after he was mistakenly arrested by the Fontana Police Department (Fontana) on a homicide warrant issued by the Long Beach Police Department.[1] Appellant declined to stipulate to Fontana's conditions and instead expressed his intent to seek an order compelling Fontana to produce the unedited tapes. Before appellant filed his mandamus petition, Fontana filed a petition seeking a protective order with regard to the tapes. Appellant filed opposition to that petition and also requested attorneys fees and costs under Government Code section 6259, subdivision (d), part of the Public Records Act.
The trial court denied Fontana's request for a protective order and, in doing so, noted that there was "no privileged information on the tapes. The argument that some information is irrelevant or unduly prejudicial does not justify a protective order. These are evidentiary issues to be addressed prior to trial, if any." The trial court also purported to "retain[ ] jurisdiction over this matter to order sanctions, as may be necessary, should the parties disseminate the tapes or the context of the tapes." After requesting further briefing on the attorney's fees issue, the trial court found that the lawsuit was not the motivating factor behind the production of the tapes and, therefore, denied appellant's attorney's fees request.
Appellant claims in this appeal that the trial court erred in denying his request for attorney's fees. We agree, for reasons we now explain, and therefore will reverse the order.

DISCUSSION
Government Code section 6259, subdivision (d) authorizes the recovery of attorney's fees and costs to the successful plaintiff in a proceeding brought to compel production of records under the Public Records Act. That section states, in pertinent part, "The court shall award court costs and reasonable attorney fees to the plaintiff should the plaintiff prevail in *643 litigation filed pursuant to this section." "A plaintiff prevails in litigation under the Public Records Act if the litigation motivated the defendant to release the requested documents." (Motorola Communication & Electronics, Inc. v. Department of General Services (1997) 55 Cal.App.4th 1340, 1344, 64 Cal.Rptr.2d 477, citing Rogers v. Superior Court (1993) 19 Cal. App.4th 469, 482, 23 Cal.Rptr.2d 412.) In other words, when the plaintiff prevails and thus compels disclosure under the Act, an award of attorney's fees and costs is mandatory. (Belth v. Garamendi (1991) 232 Cal.App.3d 896, 900, 283 Cal.Rptr. 829.)
The trial court here found the litigation was not the motivating factor behind production of the tapes and, therefore, denied appellant's request for attorney's fees and costs. That finding is not supported by substantial evidence. According to the undisputed evidence presented in the trial court, Fontana would only produce the tapes if appellant agreed to the two conditions, previously noted. Thus, in order to obtain discovery of the unedited tapes, which appellant had requested and to which appellant legally was entitled, appellant had to compel production under the Public Records Act. Fontana's assertion that it was always willing to produce the tapes, as long as appellant agreed to the editing, simply is irrelevant. Appellant was legally entitled to the unedited tapes which Fontana refused to produce until ordered to do so by the trial court. Therefore, the lawsuit was the motivating factor behind production of those tapes.[2]
The twist in this appeal is, of course, that appellant was not the "plaintiff because Fontana filed a petition for a protective order and the issue therefore was decided in that context. Thus, the final question we must resolve is whether the order in which the parties get to the courthouse, as appellant puts it, makes a difference in whether a party is entitled to recover fees and costs under the Public Records Act. We think not.
If we were to adopt Fontana's view that only the party who initiates the proceeding with respect to disclosure may recover attorney's fees and costs, then public agencies could defeat recovery of fees in every instance by doing exactly what Fontana did in this casebeating the party seeking disclosure to the courthouse and filing a petition for a protective order. That, in turn, would defeat the objective of the Public Records Act, which is to increase freedom of information by affording the public access to information in the possession of public agencies. (Los Angeles Police Dept. v. Superior Court, supra, 65 Cal.App.3d at p. 668, 135 Cal.Rptr. 575.) The happenstance of who gets to the courthouse first should not dictate whether attorney's fees and costs should be recoverable by the prevailing party. Because the proceeding in this case was the functional equivalent of a proceeding to compel production of the unedited tapes under the *644 Public Records Act and appellant was the prevailing party in the proceeding, he is entitled to recover attorney's fees despite the fact that he was not denominated "plaintiff in the action.
Accordingly, we conclude the trial court erred in denying appellant's request to recover attorney's fees and costs. We, therefore, reverse the judgment and remand the matter to the trial court to determine the amount of fees and costs appellant is entitled to recover.

DISPOSITION
The order denying attorney's fees is reversed and the matter remanded to the trial court to calculate appellant's attorney's fees and cost award under Government Code section 6259, subdivision (d). The judgment is otherwise affirmed. Appellant shall recover his costs on appeal.
RICHLI, J., and WARD, J., concur.
NOTES
[1]  The details of that arrest are fully set out in the parties' respective briefs. Because they are not relevant to resolving the issues raised in this appeal, we will not recount the details.
[2]  That the trial court purported to grant Fontana's limitation on the dissemination of the tapes also is irrelevant in our view and does not have the effect as Fontana claims of making both sides "prevailing" parties. It occurs to us that limiting the dissemination of a public record is improper. (See Los Angeles Police Dept. v. Superior Court (1977) 65 Cal. App.3d 661, 135 Cal.Rptr. 575.) which notes "if the record is a public record all persons have access thereto as permitted by Act and a person who may be the subject of the particular record sought does not, because he is personally affected, have any greater right than any person to examine the record. Conversely, a subject person has no right under Act to prevent disclosure of the record to any other person. [Citation.]" (Id. at p. 668, 135 Cal.Rptr. 575, orig. emphasis.) We need not determine the validity of the trial court's limitation on dissemination, first, because appellant does not challenge it and, second, because it was only one of two conditions that Fontana imposed on production of the tape recordings. Consequently, even if appellant had agreed to the limitation on dissemination, Fontana would not have produced the unedited tapes, unless ordered to do so pursuant to litigation.
