The relator in this proceeding seeks a writ to prohibit the superior court of King county from placing the custody of a minor child in its father pending a hearing upon a petition for habeas corpus.
The facts are as follows: Anael Gerber is the minor child of Rudolph H. Gerber and his former wife, who is the relator here. On September 21, 1915, this minor child was adjudged by the superior court of King county to be a dependent child, and an order was entered as follows:
“It Is Therefore Ordered by the court that the said Anael Gerber be and remain a ward of the court and that the said child is hereby committed to the custody and control of the Holy Names Academy in Seattle, there to remain subject to the further order of this court; . . .”
Thereafter, on June 7, 1917, Rudolph H. Gerber filed a petition in the superior court of King county for a writ of habeas corpus. An order was thereupon issued making the writ returnable on the 15th day of June, 1917. At the request of the relator, the hearing upon that writ was continued until July 27, 1917. It was then continued, at the request of the relator, until August 9, 1917, and. again continued, upon her application, to October 8, 1917. At the time of the last continuance, the court announced that he would sign an order giving the custody of the minor child to Mr. Gerber pending the hearing upon the application for the writ of *440habeas corpus. Thereupon, application was made to this court to prohibit the lower court from signing the order changing the custody of the child pending the hearing.
It is argued by the relator that the trial court has no jurisdiction to entertain the writ of habeas corpus, because Mr. Gerber seeks to attack an order of the superior court committing the child to the custody of the Holy Names Academy, and therefore the court is without jurisdiction to make an order changing the custody of the child pending the decision upon the writ of habeas corpus. Jurisdiction is the power of the court to decide a given question. Jurisdiction does not depend upon the way the question may be decided. If we were to concede that the facts set out in the petition for the writ of habeas corpus are insufficient to justify the court in setting aside the order of September 24, 1915, committing the child to the custody and control of the Holy Names Academy, it does not follow that the court is without jurisdiction, because the court still has the power to decide that question. The statute provides, at Rem. Code, § 1063, that every person restrained of his liberty, under any pretense whatever, may prosecute a writ of habeas corpus to inquire into the cause of the restraint. The court, therefore, clearly has jurisdiction of the subject-matter, and may determine whether the facts alleged in the petition are sufficient. Upon the filing and service of the petition, the court acquired jurisdiction to determine the facts alleged therein. The statute, Rem. Code, § 1083, provides that the court or judge may make any temporary orders in the cause or disposition of the party during the progress of the proceedings that justice may require. The custody of any party restrained may be changed' from one person to another, by order of the court or judge. Since the court had jurisdiction of the subject-matter under this statute, it clearly had the right to make an order changing the custody of the minor child pending the hearing upon the application for the writ of habeas corpus.
*441Relator further contends that the judge in whose department the application was filed, and who is about to make the order here sought to be prohibited, is without jurisdiction, because the child was committed to the Holy Names Academy by another judge, who was sitting in the juvenile department of the superior court of King county, and because the judge in the juvenile department is the only one who may modify the order committing the child to the Holy Names Academy. If modification is the proper remedy, and if the judge presiding in the juvenile department is the only one who may modify the order of commitment of the minor child, we are satisfied that the application for a writ of habeas corpus may be treated as an application to modify that order, and in that event the proceeding may be transferred by the judge,in whose department the application for habeas corpus is filed to the judge occupying the juvenile department of that court. It is plain from the order itself that the commitment is not a permanent one. The superior court of King county may modify that order whenever the circumstances surrounding care and custody of the child may justify such modification. The statute, at § 9 of the juvenile court law, chapter 160, Laws of 1913, p. 527, Rem. Code, § 1987-9, provides that:
“The jurisdiction of the court shall continue over every child brought before the court, or committed pursuant to this act, and the court shall have power to order a change in the care or custody of such child, if at any time it is made to appear to the court that it would be for the best interests of the child to make such change.”
And at § 15 of the same act, chapter 160, Laws of 1913 (Rem. Code, § 1987-15), at page 530, it is provided that:
“Any order made by the court in the case of a dependent or delinquent child may at any time be changed, modified or set aside, as to the judge may seem meet and proper.”
The welfare of the child is to be taken into consideration in determining its care and custody, and if the court finds *442that the welfare of the child demands a change of custody, the court, no doubt, under the statute, and under the order of commitment, has jurisdiction to make such change. It was clearly not the intention of the act of 1913, above referred to, to in any wise change the law in force regarding writs of habeas corpus, and, if the child is illegally restrained of its liberty, or the court finds that the welfare of the child would be promoted by a change of custody, it no doubt has the right and authority to make an order changing the custody upon a final hearing, or temporarily pending the final hearing. Under the statute, Rem. Code, § 1083, above quoted, the court is given power expressly to change the custody from one person to another. That is all that is threatened in this case, and it is .plain the court will not exceed its jurisdiction in making the threatened order. The application for the writ of prohibition is therefore denied.
Ellis, C. J., Parker, Main, and Morris, JJ., concur.