
27 Cal.App.4th 946 (1994)
33 Cal. Rptr.2d 27
In re STERLING B. SCOTT II on Habeas Corpus.
Docket No. A065063.
Court of Appeals of California, First District, Division Four.
August 23, 1994.
*947 COUNSEL
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Kenneth C. Young, Assistant Attorney General, Karl S. Mayer and Susan J. King, Deputy Attorneys General, for Appellant.
Steven Fama for Petitioner.
*948 OPINION
ANDERSON, P.J.
The California Department of Corrections (appellant) appeals from an order granting the petition of Sterling B. Scott II (petitioner) for a writ of habeas corpus. We reverse.

I. FACTUAL BACKGROUND
Petitioner is a prisoner at San Quentin State Prison. While he was a prisoner at Solano State Prison in 1993, he became involved in a series of exchanges with correctional officers stemming from the fact that no potatoes were available at the time he went to the dining hall for the evening meal.[1]
Following those exchanges, disciplinary proceedings were initiated against petitioner in which he was charged with violation of title 15, California Code of Regulations, section 3005, subdivision (c), which provides that inmates "must not willfully attempt to incite others, either verbally or in writing, or by other deliberate action, to use force or violence upon another person." Those proceedings resulted in petitioner's loss of 30 days of good conduct credits. Petitioner appealed that decision through administrative channels. When his administrative appeal(s) was (were) unsuccessful, he filed a petition for a writ of habeas corpus in the superior court, seeking reversal of the decision of the prison officials and restoration of the 30 days of behavior credits. The petition was not served on appellant or the District Attorneys of Solano or Marin County.
The trial court issued an "Order Granting Petition for Habeas Corpus." The court determined, based on the record submitted by petitioner, that "[t]here was no evidence that [petitioner] willfully attempted to incite others to use force or violence upon staff or any other person." The court then ordered appellant to restore the 30 days of behavior credits lost as part of the disciplinary proceedings.
Appellant argues that the trial court erred in granting the relief requested without issuing a writ or an order to show cause which would have permitted appellant to respond to the petition. Per appellant, the procedure followed by the trial court violated appellant's right to due process of law.

II. ANALYSIS
(1) The Legislature and the courts of the State of California have created two alternative means for reaching the merits of petitions for writs of habeas *949 corpus filed in superior courts. Under the Penal Code, a petitioner files a verified petition. (Pen. Code,[2] § 1474.) The court then issues a writ, directed to "the person having custody of or restraining" the petitioner and commanding that person "to have the body of [petitioner] before the Court or Judge before whom the writ is returnable, at a time and place therein specified." (§ 1477.) The writ must then be served on the person having custody of the petitioner. (§ 1478.) That person must then file a return which meets the requirements of section 1479 and produce the body of the petitioner (except as provided under section 1482). (§ 1481.) The petitioner then has an opportunity to respond to the return (§ 1484) before the court addresses the merits of the petition (§§ 1483-1484).
Under the system established by the California courts, once the petitioner files the petition, the superior court first determines if, taking the facts alleged in the petition as true, the petitioner has established a prima facie case for relief; if so, the court issues an order to show cause why the relief should not be granted. (In re Lawler (1979) 23 Cal.3d 190, 194 [151 Cal. Rptr. 833, 588 P.2d 1257].) The order to show cause is then served on the person having custody of the petitioner. That person may then file a return which becomes the principal pleading "analogous to a complaint in a civil proceeding." (Ibid.) The petitioner may then file a traverse, at which point the court considers the merits of the petition. (Ibid.)
Whichever procedure is followed, it is clear that the person having custody of the petitioner is entitled to notice of the proceedings and an opportunity to be heard. The right to be heard at a meaningful time in a meaningful manner is fundamental to due process. (Mathews v. Eldridge (1976) 424 U.S. 319, 333 [47 L.Ed.2d 18, 32, 96 S.Ct. 893].) (2) Here, appellant was never given notice of the proceedings before the superior court. The failure to provide such notice is a clear violation of appellant's right to due process of law.
Petitioner argues that the error in not providing notice is harmless because the record before the trial court supports the conclusion that there was no evidence that petitioner willfully attempted to incite others to use force or violence against another person. Petitioner also argues that appellant's "position" was, in fact, made clear in the responses of prison officials to petitioner's administrative appeals (which were attached as exhibits to the petition).
Petitioner's arguments miss the mark. The petition certainly contained what petitioner wanted the superior court to review and consider. The *950 purpose of the return is to permit the person who has custody of the prisoner to present facts and authorities he or she wishes the court to review and consider. Because appellant was not afforded that opportunity, the record upon which we could evaluate whether or not the court's (alleged) error in granting the relief requested was harmless does not exist.
In sum, we find that the procedures followed by the trial court deprived appellant of due process of law. The judgment of the trial court is reversed. The matter is hereby remanded to the trial court for proceedings consistent with this opinion.
Perley, J., and Reardon, J., concurred.
NOTES
[1]  Petitioner does not eat meat.
[2]  All further statutory references are to the Penal Code.
