
36 Cal.App.2d 583 (1940)
In the Matter of the Application of SHELBY LEE CHANDLER for a Writ of Habeas Corpus.
Crim. No. 3308. 
California Court of Appeals. Second Appellate District, Division One.  
January 15, 1940.
 T. T. Hawkins and Bates S. Himes for Petitioner.
 Buron Fitts, District Attorney, and Jere J. Sullivan, Deputy District Attorney, for Respondent.
 White, J.
 Petition for a writ of habeas corpus. The facts are uncontroverted, and so far as pertinent hereto are *584 that during November, 1938, petitioner and his wife separated, and by mutual consent petitioner took custody of their three minor children. At the time of the separation petitioner, his wife and children were all residents of the county of Los Angeles in this state. After retaining exclusive possession of the children until about July 2, 1939, petitioner changed their domicile to the State of Texas, but retained his own residence in California. Since the marital separation petitioner has been the sole support of such children. He avers that at the time he removed the children to Texas he was unaware that his wife contemplated bringing an action for divorce. However, on July 17th, some two weeks after petitioner had changed the domicile of said children, his wife filed an action against him for divorce in the Superior Court of the County of Los Angeles. In this action the wife sought custody of the children and money for her and their support.
 On the day the divorce action was filed the superior court, pursuant to the provisions of section 138 of the Civil Code, issued an order directing petitioner to appear before such court to show cause why, among other things, his wife should not have custody of the children pendente lite. Pursuant to such order, petitioner appeared in court, and following a hearing at which it was established that the children were residing in Texas since a date prior to the filing of the divorce action and were being supported by petitioner, objection was made to the superior court's making any order in re custody of children on the ground that the latter at all times prior to and at the time of the institution of the divorce action resided outside the State of California, and that the Superior Court of Los Angeles County was without jurisdiction to make any order concerning their custody. Following the submission of this issue, the court, on August 28, 1939, made an order requiring petitioner to bring said children from the State of Texas and produce them in the Los Angeles superior court on or before September 18, 1939. For his disobedience of this order petitioner was adjudged in contempt of court, and on November 17, 1939, was committed to the county jail until such time as he "returns the children to the jurisdiction of said court". *585
 [1] This factual situation squarely presents to us the question as to whether the Superior Court of the State of California is possessed of jurisdiction to order a father to bring his children from a foreign jurisdiction into the jurisdiction of the court hearing a divorce action, for the purpose of a determination as to their custody, when such children were in the exclusive custody of such father for several months prior to the commencement of such divorce action and where prior to the filing of such divorce action, at the time of its filing, and at all times thereafter, such children were residing outside the jurisdiction of the court hearing the divorce action.
 Jurisdiction has been defined as being the power to hear and determine the matter in controversy. The particular matter here in controversy was the custody of the minor children of the parties to a divorce action. Did the superior court have jurisdiction to determine the custody of children lawfully domiciled outside the State of California at the time of the commencement of the divorce action? [2] Respondent concedes that it is well settled that our courts have no authority to award custody of children not within their territorial jurisdiction (9 Cal.Jur. 786, and cases therein cited); but it is argued that when the court obtained jurisdiction of the parties it had the right to order one of the parties to bring the children from without to within the jurisdiction. We think not. Petitioner was not before the court on any order to show cause why he should not bring the children into the jurisdiction of the Superior Court of California. Indeed, no such order is authorized by section 138 of the Civil Code. The petitioner was before the court on an order to show cause in re custody of children, and the court was without jurisdiction to determine such custody. Where, as here, the domicile of the children was by the husband legally and lawfully changed from California to Texas (Civ. Code, sec. 213) prior to the commencement of the divorce action, the court is without power to punish such husband for the doing of such legal and lawful act. With the father under commitment of confinement in jail until he returns the children from Texas, what an anomalous situation would arise if the courts of Texas in whose jurisdiction the children concededly now are should determine, as they have a right to do, in the exercise *586 of such jurisdiction, that the best interests and welfare of the children would be served by their remaining in Texas. If the children were within the jurisdiction of the California court at the time the action was commenced, thereby vesting such court with power to determine their custody, or if the court had made an authorized order affecting such custody, it would then be empowered to punish as a contempt the refusal of the husband to produce such children in conformity with the order as to their custody.
 Under the American philosophy of government, the child is not the creature of the state; and where the father, as he had a right to do in this case, determined to domicile his children in the State of Texas, it does not lie within the power of any court of this state to send him to jail for doing that which he was legally and lawfully entitled to do, nor to require him to go outside of this state to undo such lawful act.
 The petitioner is discharged from custody.
 York, P. J., and Doran, J., concurred.
