
403 P.2d 696 (1965)
75 N.M. 257
Roman TRUJILLO, Petitioner,
v.
Harold A. COX, Warden of the New Mexico State Penitentiary, Respondent.
No. 7881.
Supreme Court of New Mexico.
May 13, 1965.
Rehearing Denied June 24, 1965.
*697 Joseph A. Roberts, Santa Fe, for petitioner.
Harry S. Connelly, Jr., Sp. Atty. Gen., Santa Fe, for respondent.
PER CURIAM.
The petitioner, Roman Trujillo, seeks his release upon the ground that he was not given a preliminary hearing nor bound over by the juvenile court to await the action of the district court and that, accordingly, the district court was without jurisdiction and its commitment is void.
When petitioner was 17 years of age, he was charged with murder by a petition filed in the juvenile court of San Miguel County on January 31, 1958. The record is completely silent as to any further proceedings in that court. We note from the district court records that a criminal complaint was filed on February 18, 1958, and an information was filed on March 4, 1958, charging petitioner with murder. Counsel was appointed to represent petitioner, and, with the advice of such counsel, he entered a plea of guilty to first degree murder. The death penalty was waived by the district attorney and petitioner was sentenced to life imprisonment.
Exclusive original jurisdiction over juveniles under 18 years of age is vested in the juvenile court by § 8, Ch. 205, Laws 1955, which has been amended and now appears as § 13-8-26 N.M.S.A. 1953. In those states having statutes similar to our own, it is commonly held that the trial courts are without jurisdiction to proceed against such a juvenile unless and until the juvenile court has transferred him to the trial court in the manner provided by statute. Anno. 48 A.L.R.2d 663, 686.
At the time when this offense is alleged to have occurred, § 9, Ch. 205, Laws 1955 (repealed and a new section enacted by Ch. 361, Laws 1959, § 13-8-27 N.M.S.A. 1953) was in force and required the juvenile court to conduct a preliminary hearing in the case of any juvenile over 14 years of age charged with an offense which would be felony if committed by an adult. If, after such preliminary hearing, the juvenile court should find that such minor was not "a proper subject for reformation or rehabilitation," the statute required the juvenile court to bind him over to await the action of the district court as in any other criminal case.
The record stipulated into evidence in this case fails to disclose that a preliminary hearing was held or that the juvenile court made or entered an order binding the petitioner over to the district court. We cannot agree with petitioner that a copy of the order of transfer must actually appear in the files of the district court to confer upon it jurisdiction over the minor. It is not the fact that the district court is in possession of the copy of the order that gives it jurisdiction, but rather the fact that the proper order had been made. To hold that failure to furnish the district court with the order of transfer is fatal to that court's jurisdiction would be to surrender the substance to the shadow. Baughman v. Commonwealth, 206 Ky. 441, 267 S.W. 231.
Petitioner argues that Childers v. Commonwealth, (Ky.) 239 S.W.2d 255 necessarily overruled Baughman since it required the order of transfer to affirmatively appear in the files of the district court to confer jurisdiction. We do not so construe Childers. There the Kentucky court said:
"When it develops in the course of a trial that the defendant is a juvenile within the terms of the statute, it is incumbent upon the Commonwealth to show affirmatively that the circuit court has jurisdiction and that there has been a proper transfer from the juvenile court of the criminal prosecution."
It was pointed out that since it had appeared early in the course of the trial in the *698 circuit court that the defendant was a minor and since the record failed to show that the minor was in fact certified to the circuit court, it was therefore without authority to proceed. The court reaffirmed the statement in Baughman that if the order of transfer was actually made by the juvenile court, failure to furnish a copy thereof to the circuit court was not fatal to its jurisdiction. Although the court used some rather ambiguous language concerning how it may be affirmatively shown that the circuit court had jurisdiction, we think the clear intention was that when it appears during the trial that the defendant is a juvenile, it is then incumbent upon the state to show that a transfer had actually been ordered and that one form of such proof would be the filing of a copy of the juvenile court's order.
It must be remembered that both Baughman and Childers were appeals from convictions of murder. Where the minority of the defendant appears during the course of the trial, the jurisdiction of the trial court must, at that point, be affirmatively established. Where release from custody is sought in a collateral attack upon the judgment under which the petitioner is restrained, as in habeas corpus, the right to the writ only exists where the judgment is void, Smith v. Abram, 58 N.M. 404, 271 P.2d 1010, and the jurisdiction of the court rendering the judgment may be attacked for the first time; but, by the same token, the state may establish the jurisdiction of the district court by competent evidence in this proceeding. This is one of the basic distinctions from an appeal where only the record in the lower court may be considered. Nothing appears in the record of this criminal case in the district court to show that the accused was under the age of 18 years, nor was the jurisdiction of that court challenged in any manner.
The state has sought to establish the fact that an order was actually made by the juvenile court binding the petitioner over to the district court, by stipulating in evidence in this proceeding a letter from the judge of the juvenile court stating that he remembers making such an order, but that neither the order nor any record of it can be found. In Baughman v. Commonwealth, supra, the jurisdiction of the court was challenged when it appeared during the trial that the defendant was a minor. The Kentucky court said that proof of the fact that a transfer was actually made was satisfied by the juvenile judge who testified from the juvenile court record itself that he had made and entered the order as it appeared in the juvenile court records. There, however, the judge was a witness testifying from his court records and was subject to cross-examination. The letter offered here is clearly not the best evidence and falls far short of the requirements for the introduction of secondary evidence to establish the fact for which it is offered. We think the jurisdiction of the trial court cannot be affirmatively established by a mere letter, even though it be that of the juvenile judge. We are of the opinion that, when it has been made to appear in a habeas corpus proceeding that the petitioner was a minor within the terms of the statute requiring an order of transfer from the juvenile court to confer jurisdiction on the district court, the fact that such order was actually made must appear by competent evidence. Absent such proof, his commitment to the penitentiary was upon a void judgment.
By our determination that the district court was without jurisdiction, we do not consider whether or not there has been a bar to a renewal of the inquiry as to the disposition to be made of the charge against the accused, nor do we determine whether that court is in a position to acquire jurisdiction in a new case.
It follows that the petitioner should be discharged from the custody of the warden of the New Mexico State Penitentiary.
It is so ordered.

On Motion for Rehearing.
PER CURIAM.
The state's motion for rehearing was filed after the petitioner had been discharged from custody. The cause thus being moot, the motion for rehearing will stand denied without consideration of the merits. State ex. rel. Roberts v. Swope, 38 N.M. 53, 28 P.2d 4; Leach v. Cox, 74 N.M. 143, 391 P.2d 649.
