
27 Cal.2d 500 (1946)
NICHOLAS RODRIGUEZ, Petitioner,
v.
THE SUPERIOR COURT OF THE CITY AND COUNTY OF SAN FRANCISCO et al., Respondents.
S. F. No. 17206. 
Supreme Court of California. In Bank.  
Jan. 8, 1946.
 Morris Oppenheim for Petitioner.
 Robert W. Kenny, Attorney General, David K. Lener, Deputy Attorney General, and Edmund G. Brown, District Attorney, for Respondent.
 GIBSON, C.J.
 The object of this proceeding is to prevent the respondent court from retrying petitioner on a criminal charge of which he allegedly has been acquitted. Petitioner was tried on an information containing two counts, the first charging statutory rape, and the second accusing him of contributing to the delinquency of the minor involved in count one in violation of section 702 of the Welfare and Institutions Code. He was found not guilty of rape and of the included offense of attempted rape. The jury disagreed on the charge of violating section 702, and petitioner seeks to restrain the court from trying him again for this offense. He claims he has been once in jeopardy and that therefore the court is without jurisdiction to proceed against him.
 [1] Prohibition is an appropriate remedy to prevent the retrial of a defendant who has been in jeopardy. (Jackson v. Superior Court, 10 Cal.2d 350 [74 P.2d 243, 113 A.L.R. 1422].)
 [2] In support of his claim of double jeopardy petitioner asserts that since both counts are based on the same occurrence or transaction, the offense defined in section 702 is necessarily included in the charge of rape or attempted rape and that an acquittal of the greater offenses is a bar to prosecution of the lesser offense. The test, however, is the identity of the offenses and not the identity of the occurrence from which they arise. A defendant may be convicted of separate offenses arising out of the same transaction when each charge is separately stated and the offenses differ in their elements and one is not included in the other. (People v. Kearney, 20 Cal.2d 435 [126 P.2d 612]; People v. Hoyt, 20 Cal.2d 306, 317 [125 P.2d 29]; see, also, People v. Craig, 17 Cal.2d 453, 457-458 [110 P.2d 403]; People v. Coltrin, 5 Cal.2d 649, 660 [55 P.2d 1161].) *502
 In People v. Kearney, 20 Cal.2d 435 [126 P.2d 612], the defendant was separately charged with rape and with a violation of section 288 of the Penal Code. Both charges were based on the same occurrence. Defendant contended that a dismissal of the rape charge operated to acquit him on the charge under section 288. We held (p. 438) that, "The two offenses are separate and distinct and made up of different elements. The rape count was dismissed because the evidence failed to show penetration. The child's testimony was uncertain on the point, and the medical testimony showed a lack of penetration. It does not follow, however, that defendant's conduct with the prosecutrix at the time was not of a lewd and lascivious character within the meaning of section 288, supra. The contention is answered by section 954 of the Penal Code, which provides that where, as here, a defendant is charged with two or more different offenses connected together in their commission. 'A verdict of acquital of one or more counts shall not be deemed or held to be an acquittal of any other count. See, also, People v. Amick, 20 Cal.2d 247 [125 P.2d 25]; People v. Stangler, 18 Cal.2d 688, 695-696 [117 P.2d 321]."
 [3] While it is true that acts constituting statutory rape or attempted rape may also constitute a violation of section 702, since those acts by their very nature would contribute to the delinquency of the minor, the converse is not true. The facts may fail to establish rape or attempted rape yet justify a conviction under section 702. Consequently, petitioner's acquittal under the first count of the information is not a bar to his prosecution and conviction under the second count.
 [4] Petitioner also claims that not only is the occurrence underlying the rape charge identical with that relied upon to support the accusation under section 702, but that the proof in support of the two charges is the same. He says that he would be guilty of rape if the things the prosecutrix testified to actually occurred, but that if her story is untrue he is not guilty of any offense. Petitioner argues that his acquittal of rape and of the included offense of attempted rape establishes the falsity of her testimony, and that he cannot be retried upon evidence which was addressed to the charge of which he stands acquitted. There is no merit in this contention. The jury may reject a portion of the testimony of a witness and accept a part of it. The testimony accepted by the jury *503 may support a conviction of one offense, while another charge contained in the same information may fail because the jury has rejected evidence necessary to establish an essential element of the crime.
 The alternative writ of prohibition is discharged and the application for a peremptory writ is denied.
 Shenk, J., Edmonds, J., Carter, J., Traynor, J., Schauer, J., and Spence, J., concurred.
