( In re Jones, 61 Cal.2d 325 [ 38 Cal.Rptr. 509, 392 P.2d 269]; In re Raner, 59 Cal.2d 635 [ 30 Cal.Rptr. 814, 381 P.2d 638]; In re Singh, 234 Cal.App.2d 455 [ 44 Cal.Rptr. 474].) Petitioner argues that since the underlying commitment forming the basis of the confinement was improper, a charge of escape is not sustainable, citing People v. Ah Teung, 92 Cal. 421 [28 P. 577, 15 L.R.A. 190]; People v. Clark, 69 Cal.App. 520 [ 231 P. 590]. Those cases undoubtedly contain language that supports the position of petitioner, but later cases have explained that there are certain fundamental limitations on the application of that rule.
" (Emphasis ours.) The statements made in Ruling Case Law have been carried into 19 American Jurisprudence, 359 et seq., Sections 2 and 10. A part of the text in Ruling Case Law has been taken from the opinion of the court in the case of People v. Ah Teung, 92 Cal. 421, 28 P. 577, 15 L.R.A., 190, where it was urged, as here, that the prisoner's only remedy was through habeas corpus. The court rejected this view and held that there can be no escape in a legal sense unless there was a lawful custody.
And see 2 Wharton, Criminal Law (12 th ed. 1932), ยง 2021, p. 2334. Supporting the text in 56 A.L.R., above, are such cases as People v. Ah Teung, 92 Cal. 421, 28 P. 577, 15 L.R.A. 190 ( Sup. Ct. 1891); People v. Clark, 69 Cal.App. 520, 231 P. 590 ( D. Ct. App. 1924); and State v. Ferguson, above. But these were situations where the committing authority was wholly without jurisdiction to commit defendant to prison in the first place.