
120 Cal.App.3d 967 (1981)
175 Cal. Rptr. 91
In re KORRY K., a Minor, on Habeas Corpus.
Docket No. 38929.
Court of Appeals of California, Second District, Division Five.
June 25, 1981.
*968 COUNSEL
Wilbur F. Littlefield, Public Defender, Kenneth I. Clayman, Barry M. Karl and Jack T. Weedin, Deputy Public Defenders, for Petitioner.
John K. Van de Camp, District Attorney, Donald J. Kaplan and Suzanne Person, Deputy District Attorneys, for Respondent.
OPINION
STEPHENS, J.
The minor petitioner herein challenges an order detaining him in juvenile hall (Welf. & Inst. Code, § 636)[1] pending his *969 jurisdictional hearing in a section 602 proceeding. The Supreme Court issued an order to show cause returnable before this court. Shortly thereafter a jurisdictional hearing was held and the question became moot as to petitioner. The issues raised by the petition involve the scope of evidence admissible in juvenile detention proceedings, issues of broad public interest. Because of the limited time between detention proceedings and adjudications of the juvenile court's jurisdiction under section 602, it would be virtually impossible, as a practical matter, to find a case in which the issue did not become moot as to the petitioning minor before an appellate court could issue a final ruling. We therefore consider the merits of the issues raised. (In re William M. (1970) 3 Cal.3d 16, 23 [89 Cal. Rptr. 33, 473 P.2d 737]; In re Dennis H. (1971) 19 Cal. App.3d 350, 352 [96 Cal. Rptr. 791].)
The section 602 petition alleged that petitioner had violated Penal Code sections 245, subdivision (a) (assault with a deadly weapon), 242 and 243 (battery) and 594, subdivision (a) (malicious mischief). At the detention hearing, which was conducted October 16, 1980, the court considered a detention report prepared by a deputy probation officer and a police officer's arrest report. According to these reports, petitioner created a disturbance outside a Stop & Go Market, was pushed by a female clerk and asked to leave. He left momentarily, but immediately returned, broke a 16-ounce bottle and slashed the clerk's throat.
The police report detailed an investigation of the incident which involved interviews with four witnesses, two of whom were petitioner's friends. The latter two claimed that the clerk, without provocation, "slugged, kneed, and verbally chastised" petitioner, that petitioner had been carrying an empty soda pop bottle which he dropped while attempting to defend himself, and that when it shattered a large piece of glass flew up and hit the victim in the throat. The other two witnesses, who knew petitioner casually from school, corroborated the victim's version.
After reviewing the reports,[2] the court ordered petitioner detained, stating: "It's a matter of urgent and immediate necessity for the safety of person and property. That's life-endangering conduct. There are no circumstances short of self-defense or defense of others which would *970 justify that kind of response, loss of temper ... [¶] I would not be at all comfortable with his release until such time as the circumstances are better understood...."
Petitioner then requested a rehearing on the issue of detention. (§ 637; In re Dennis H., supra, 19 Cal. App.3d 350.) At the rehearing, the People called the officer who prepared the arrest report. He testified about his investigation of the incident. He had personally interviewed the victim and the two witnesses who were petitioner's friends. The other two witnesses described in the arrest report had been interviewed by another officer.
Petitioner's counsel expressed a desire to call the two witnesses who, according to the arrest report, had corroborated the victim's story. A dispute then arose over whether their testimony would be relevant. The court stated, "You're trying to prove the lady came out and attacked him first and he was defending himself?" Counsel responded affirmatively. Despite the court's intimation at the earlier hearing that it might be interested in the issue of self-defense, the court now stated that the testimony petitioner was seeking to present would amount to an affirmative defense and that such evidence was irrelevant at a "Dennis H. hearing."
Petitioner's counsel argued that if it could be shown that petitioner had acted in self-defense and had not verbally abused the victim, that would indicate that there was no reason to detain petitioner. The court inquired if counsel believed that a minor had the same right to put on a full blown defense at a detention hearing that an adult has at a preliminary hearing. Counsel stated that that was one of the bases on which he sought to produce the evidence; but that there was a second basis as well. Under sections 635 and 636, the court may consider the circumstances, as well as the gravity of the alleged offense, in conjunction with other (unspecified) factors, to determine whether it is reasonably necessary for the protection of the person or property of another that the minor be detained. Counsel stated that just because the People established a prima facie case, he was not precluded from calling witnesses to show the facts and circumstances surrounding the incident to show that detention of the minor was not necessary for the protection of the person or property of others. The court responded: "I think the only relevant evidence you can offer me is evidence to the effect that the crime in fact did not occur, not evidence to mitigate, extenuate, or defend the crime."
*971 (1) Petitioner was in error in his first argument. A juvenile detention hearing (§ 635) or rehearing (§ 637) is not the equivalent of an adult preliminary hearing and the minor has no right to prove an affirmative defense for the sole purpose of having the charges against him dismissed  the issue being detention, not guilt.
(2) Petitioner was correct, however, in arguing that he was entitled to present evidence which demonstrated that he was not a danger to the community pending the jurisdictional hearing, even though the prima facie case had been established. It is no basis for exclusion, that evidence which may demonstrate that a minor is not a danger to others pending the jurisdictional hearing, may also provide an affirmative defense at the jurisdictional hearing. Sections 635 and 636 clearly contemplate that the court consider such evidence. If the court finds the evidence convincing, it must release the minor from custody pending the jurisdiction hearing, even though it need not dismiss the charge. For example, had petitioner been able to demonstrate that the clerk committed an unprovoked physical attack upon him, and that he only acted in self-defense, the court might have concluded that he was not a menace on the streets pending the jurisdiction hearing, even though, at that hearing, it might have concluded that his response to her provocation was excessive and thus not a defense to the charge.
The court erred in failing to acknowledge or address the distinction between a defense to the charge and factors relevant to the issue of detention  whether or not those two issues involved similar or overlapping evidence  and in refusing to allow petitioner to complete his offer of proof which may have established the relevance of the testimony of his witnesses as to the issue of detention.
Since, however, the issue is now moot as to petitioner, the order to show cause is discharged and the petition for writ of habeas corpus is denied.
Kaus, P.J., and Ashby, J., concurred.
NOTES
[1]  All statutory references are to the Welfare and Institutions Code unless otherwise indicated.
[2]  The court also heard testimony from petitioner's former probation officer who happened, by coincidence, to be in court. She had no knowledge of the new incident, except what she learned in court by reading the reports, on the basis of which she thought petitioner should be detained.
