
106 Cal.App.3d 357 (1980)
165 Cal. Rptr. 57
COUNTY OF NEVADA, Plaintiff and Respondent,
v.
ANDREW KINICKI, Defendant and Appellant.
Docket No. 18401.
Court of Appeals of California, Third District.
May 29, 1980.
*359 COUNSEL
John Dutton for Defendant and Appellant.
George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Gregory W. Baugher and James Ching, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
BLEASE, J.
Defendant Andrew Kinicki appeals from the judgment entered after a jury found that he was the father of Paul R., born to Beverly R. on March 24, 1976.


*360 I
The action under review was initiated by the District Attorney of Nevada County pursuant to his obligation (Welf. & Inst. Code, § 11475) to enforce the support obligations of parents, determine paternity, and seek reimbursement of funds expended as aid to families with dependent children (AFDC). (Tit. IV-D, 42 U.S.C. § 651 et seq.; Welf. & Inst. Code, §§ 11475-11489.) It sought inter alia a determination that defendant was the father of the child and reimbursement from him for AFDC sums expended in support of the child. We shall reverse the judgment for refusal of the trial court to permit production of Nevada County welfare records pertaining to the identity of the father of the child.
The issue of paternity was bifurcated from the issue of reimbursement and we consider here only the plaintiff's claims that its welfare records relating to paternity are privileged from disclosure under the provisions of Welfare and Institutions Code section 10850 and Evidence Code section 1040, subdivision (b)(2). We shall conclude that the records are not privileged and are subject to subpoena for use in the paternity action.

II
Defendant sought the production at trial, by subpoena duces tecum, of plaintiff's welfare records pertaining inter alia to the identity of the father of Paul.[1] During the trial the court denied production of the records on the plaintiff's claim that the records are confidential and protected from disclosure by Welfare and Institutions Code section 10850.
Plaintiff concedes on appeal that section 10850 does not itself protect the records from disclosure but argues that the section, in combination *361 with Evidence Code section 1040, subdivision (b), creates a qualified privilege which, on the facts here, must be recognized. We disagree.
Welfare and Institutions Code section 10850, subdivision (a),[2] provides that AFDC records "shall not be open to examination for any purpose not directly connected with the administration of [the] program, or any ... civil proceeding conducted in connection with the administration of [the] program."
(1) As plaintiff concedes, a proceeding to establish paternity and to recover support funds paid to Beverly R. under the AFDC program is a civil proceeding directly connected with the administration of the program, since the AFDC laws contemplate just such a proceeding (see 56 Ops.Cal.Atty.Gen. 279, 282 (1973)) and, consequently, section 10850 does not prohibit production of the welfare records requested in defendant's subpoena duces tecum. (See Rivera v. Los Angeles County Civil Service Com. (1979) 87 Cal. App.3d 1001 [151 Cal. Rptr. 480]; In re Jeannie Q. (1973) 32 Cal. App.3d 288 [107 Cal. Rptr. 646].)
(2) Recognizing this, plaintiff seeks refuge in Evidence Code section 1040, subdivision (b)(2), which provides a qualified privilege if "[d]isclosure of the information is against the public interest because there is a necessity for preserving ... confidentiality... that outweighs the necessity for disclosure...."[3]
*362 Plaintiff's implicit argument is that there is a public interest in confidentiality of the welfare records by virtue of state and federal AFDC law thus bringing into play the balancing test of Evidence Code section 1040, subdivision (b)(2).
Plaintiff's argument founders on the very law on which it seeks its footing. As will be shown, plaintiff has no public interest in the nondisclosure of records pertaining to the paternity action which it initiated in pursuance of the AFDC laws. On the contrary, the public interest in these circumstances, as defined by statute, is in disclosure.
(3) California receives AFDC funds pursuant to the federal Social Security Act (see tit. IV-A, 42 U.S.C. § 601 et seq.; Welf. & Inst. Code, § 11200 et seq.; Ogdon v. Workmen's Comp. Appeals Bd. (1974) 11 Cal.3d 192, 198 [113 Cal. Rptr. 206, 520 P.2d 1022]) and must therefore comply with the mandatory requirements of the act, as interpreted by federal regulations. (In re Jeannie Q., supra, 32 Cal. App.3d at p. 298; Ogdon v. Workmen's Comp Appeals Bd., supra, 11 Cal.3d at p. 199; Carleson v. Superior Court (1972) 27 Cal. App.3d 1, 5 [103 Cal. Rptr. 824]; County of Alameda v. Carleson (1971) 5 Cal.3d 730, 739 [97 Cal. Rptr. 385, 488 P.2d 953].)
The confidentiality provision of Welfare and Institutions Code section 10850 implements federal laws providing for the confidentiality of records obtained in the course of administration of the AFDC program. Federal statutes require that "A State plan for aid and services to needy families with children must ... (9) provide safeguards which restrict the use of [or] disclosure of information concerning applicants or recipients to purposes directly connected with (A) the administration of the plan of the State approved under this part, ... [or] (B) any investigation, prosecution, or criminal or civil proceeding, conducted in connection with the administration of any such plan or program...." (42 U.S.C. § 602(a)(9).)
As applicable here, the state plan must "restrict the use of [AFDC records] to ... [a] civil proceeding, conducted in connection with the administration of [the] program...." (Italics added.) The implementing federal regulation provides that "the use or disclosure of information *363 concerning [AFDC] recipients ... is limited to purposes directly connected with: ... [¶] (2) Any ... civil proceeding conducted in connection with the administration of [the AFDC program]...." (Italics added.) (45 C.F.R. § 302.18(a)(2).) Welfare and Institutions Code section 10850, subdivision (b), makes plain the disclosure role of the law in stating that "[s]uch lists or other records shall only be used for purposes directly connected with the administration of public social services."
Accordingly, the AFDC law not only defines the conditions of nondisclosure, but of disclosure as well. It authorizes disclosure where, as here, the information is to be "used for purposes directly connected" with a civil proceeding to enforce the AFDC law. Since disclosure is statutorily permitted, there is no public interest in nondisclosure of the subpoenaed records for use in the paternity action and no qualified privilege under Evidence Code section 1040, subdivision (b)(2).
We have no occasion to review plaintiff's claims that defendant failed adequately to support the subpoena by a showing required by Code of Civil Procedure section 1985, since no such claims were made by the plaintiff below or reviewed by the trial court.
We turn to examine the effect of the error on the judgment. (4) A discovery order may be reviewed on appeal from the final judgment on the merits. (Code Civ. Proc., § 906; Southern Pacific Co. v. Oppenheimer (1960) 54 Cal.2d 784 [8 Cal. Rptr. 657, 356 P.2d 441]; Deyo v. Kilbourne (1978) 84 Cal. App.3d 771, 777, fn. 1 [149 Cal. Rptr. 499].) (5) The judgment will not be reversed unless the error is so prejudicial that it constitutes a miscarriage of justice. (Jaffe v. Albertson Co. (1966) 243 Cal. App.2d 592, 617-618 [53 Cal. Rptr. 25]; Wooldridge v. Mounts (1962) 199 Cal. App.2d 620, 628-629 [18 Cal. Rptr. 806].)
(6) While it is the unusual case in which a miscarriage of justice can be shown to result from the improper denial of discovery when raised on appeal from a judgment on the merits (Jaffe v. Albertson Co., supra, 243 Cal. App.2d at pp. 617-618; Wooldridge v. Mounts, supra, 199 Cal. App.2d at pp. 628-629), the facts in this case compel such a conclusion. The paternity action was instituted by the plaintiff to enforce the AFDC laws. Necessarily, it had to resort to its own welfare records to maintain the action. Yet it seeks to deny the defendant access to the same records for any purpose, including the discovery of evidence supporting *364 his defense that he is not the father of Paul R. The plaintiff seeks to pick and choose from amongst its records without fear of rebuttal. This selective maintenance of secrecy not only violates the AFDC laws but injects a fundamental unfairness into the procedure prejudicing the defendant's capacity to defend himself and constituting on these facts a miscarriage of justice.
Because of the ground of resolution we do not reach defendant's other assignments of error.
The judgment is reversed.
Puglia, P.J., and Paras, J., concurred.
NOTES
[1]  In his declaration, defendant requested the following documents: "1. All documents and writings concerning the identity of the father or alleged father of PAUL [R.]. [¶] 2. All documents and writings concerning statements or indications by BEVERLY [R.] of the identity of the father or alleged father of PAUL [R.], or indicating that BEVERLY [R.] did not know the name or identity of the father. [¶] 3. All documents and writings concerning the income, assets and employment of BEVERLY [R.]. [¶] 4. All documents and writings concerning the amount of support paid to BEVERLY [R.] for PAUL [R.] by Nevada County or any other person or entity. [¶] 5. All documents and writings concerning the application of BEVERLY [R.] for support of PAUL [R.]."

Inasmuch as the judgment relates only to paternity we do not reach any issue concerning the records specified in paragraphs 3, 4 and 5 of the declaration.
[2]  "(a) Except as otherwise provided in this section, all applications and records concerning any individual made or kept by any public officer or agency in connection with the administration of any provision of this code relating to any form of public social services for which grants-in-aid are received by this state from the United States government shall be confidential, and shall not be open to examination for any purpose not directly connected with the administration of such program, or any investigation, prosecution, or criminal or civil proceeding conducted in connection with the administration of any such program. The disclosure of any information which identifies by name or address any applicant for or recipient of such grants-in-aid to any committee or legislative body is prohibited, except as provided in subdivision (b)." (Welf. & Inst. Code, § 10850, subd. (a).)
[3]  Evidence Code section 1040, subdivision (b)(2), provides: "(b) A public entity has a privilege to refuse to disclose official information, and to prevent another from disclosing such information, if the privilege is claimed by a person authorized by the public entity to do so and;

".... .... .... .... . .
"(2) Disclosure of the information is against the public interest because there is a necessity for preserving the confidentiality of the information that outweighs the necessity for disclosure in the interest of justice; but no privilege may be claimed under this paragraph if any person authorized to do so has consented that the information be disclosed in the proceeding. In determining whether disclosure of the information is against the public interest, the interest of the public entity as a party in the outcome of the proceeding may not be considered."
