A decree of divorce was entered on April 12, 1915, by the terms of which there was awarded to the relator the custody of a minor daugh*16ter and to the father the custody of two minor boys. On March 19, 1919, the relator filed a petition in the divorce action asking to have the decree modified so as to award her the custody of all three children, who, at the time of the filing of the petition, she had in her actual care and control. A restraining order was made prohibiting the father from interfering with this care and custody pending the determination of the petition, and on June 13, 1919, the petition was heard and the decree was modified so as to award to the relator the custody of the older boy and the girl and to award to the husband the custody of the other boy. The relator, being dissatisfied with this modification, gave notice of appeal, which was perfected by furnishing an appeal bond. Thereafter the father sued out a writ of habeas corpus, directed to the relator, for the purpose of securing the possession of the boy whose custody had been awarded to him by the original decree and re-awarded by the decree as modified. Upon the return of the writ, the relator filed a plea in abatement, upon the ground that an appeal had been perfected in the divorce action. This plea was denied by the trial judge, the defendant in this action, and thereupon this application was made here to prohibit the defendant from entering an order in the habeas corpus proceeding transferring the possession of the boy to his father.
This court has early decided, and consistently followed that decision, that, upon an appeal being taken from an order modifying a divorce decree, the fact of such appeal may be set up by plea in abatement in defense to a subsequent action by either of the parties seeking to have the custody of the children changed during the pendency of such appeal; that the supreme court, after the appeal has been taken, possesses the sole power to make orders with reference to the cus*17tody of the children, and that all applications for such change must be addressed to this court. Irving v. Irving, 26 Wash. 122, 66 Pac. 123; Gust v. Gust, 71 Wash. 75, 127 Pac. 566.
In State ex rel. Davenport v. Poindexter, 45 Wash. 37, 87 Pac. 1069, a writ of habeas corpus, applied for in the supreme court, was denied where the custody of a minor child had been awarded to the mother and appeal had been taken from that order and a supersedeas bond filed, the court holding that the filing of the supersedeas bond did not give the parties in whom the custody had rested at the time of the commencement of the action the right to resume such custody, since the welfare of the child was the primary consideration:
. “In such a proceeding as this, we do not think the giving of a supersedeas bond has any effect whatever upon the possession, custody and control of the minor children in question. It being presumed that the order of the trial judge was correct, and that he was actuated by a consideration for the minors’ welfare, it would be against public policy to have that welfare imperiled during an appeal, in the absence of a statute clearly permitting the staying of such orders. The trial court had jurisdiction to take said children into its possession, if it believed that their physical or moral welfare or other substantial interests necessitated such action. When the appeal was perfected, this court became invested with jurisdiction to make such orders as the welfare and necessities of said minors might demand. If, as contended by relator, the present situation of these minors is so unsuitable as to menace their physical or moral welfare or other substantial interests, the question of an appropriate change could doubtless be considered by this court upon a proper showing. Irving v. Irving, 26 Wash. 122, 66 Pac. 123. But such a matter is not before us at this time. Relators are basing their right to the immediate possession of said children upon the supersedeas bond given as aforesaid. The giving of such bond does not entitle them to such possession. ”
*18This case, however, was distinguished and its operation restricted in the later case of State ex rel. Clark v. Superior Court, 90 Wash. 80, 155 Pac. 398, being a case very similar to the one now under consideration. There the custody of a child had been awarded to two persons for alternate periods, and an appeal had been taken to this court from that decree. The child was not delivered to the relator, who, according to the decree, was entitled to its possession on January 1, 1916. The relator then made application to the court for an order directing the compliance with that part of the decree which directed that the child should be placed in the relator’s'Custody. The court refused to do this on the ground that it lacked jurisdiction, since the appeal was pending in the supreme court, and an application was then made in this court for a writ of mandate to compel the lower court to enforce its decree. We held:
“In the case at bar, an appeal is pending. The child is in the possession of the sister of the defendant, who has been found to be worthy. Whether the respondent had jurisdiction to execute his decree by ordering the child turned over to the parents of the relator is of little consequence; for granting, as the relator admits, that the jurisdiction to make any order for the protection and welfare of the child is in this court, and having jurisdiction in virtue of the petition of the relator, we shall, in the exercise of that jurisdiction, treat the refusal of the respondent as a finding that the welfare of the child will not be jeopardized by allowing it to remain where it is pending the appeal. The custody of the child being given to the parents of the relator, and to the sister of the defendant for equal and alternating periods, neither party can claim that the particular time in which they shall have such custody is of legal consequence. It does not go to the welfare of the child, and that is the only thing this court or the superior court will inquire into. ’ ’
*19The law is, as we understand it, that, pending an appeal in such cases, the lower court has not jurisdiction to modify or alter the decree as it may relate to the custody of children, but that such application must be made to the supreme court, and that the giving of a supersedeas bond does not suspend the operation of the decree in actions of this character, as it relates to the custody of the child. The Clark case, above, having been an application for a writ of mandamus to compel the trial court to enforce its decree, and this court having treated the application as an original application in this court relating to the custody of the child, we may here treat this application for a writ of prohibition in the same manner and, as in the Clark case, determine from the record that there is no serious question concerning the worthiness of the mother or father, the trial court having seen fit to award children to each of them, and, pending the hearing, allowed the relator to have all the children in her care and keeping. In the Clark case, the relator was attempting to enforce the decree by applying for an order compelling its observance, while in this case the same result is sought to be obtained by means of a writ of habeas corpus while the appeal is pending. In neither case could the trial court take any further steps in regard to the custody or control of the child, no matter what the form of the proceeding in which such steps were sought to be taken. The writ of habeas corpus, as it may refer to the custody of minor children, does not involve the question of personal freedom, and the court in passing upon such writs is dealing with a matter’ of an equitable nature and is not bound by a purely legal right, but is called upon to give consideration to claims founded on human nature and such claims as are just and equitable, having in *20view the welfare of the child. The fundamental idea of the writ of habeas corpus is to set at large those who are illegally restrained of their liberty, but when the subject of the writ is a child, the court is not to stop with the mere removal of the illegal restraint, but can go further and transfer the custody from one person to another. These are matters which are left in the discretion of the court seeking to promote the well-being of the child. The trial court, not having power to change the decree during the appeal, the application for the writ should have been presented to this court. This court has exclusive jurisdiction and was the forum in which any proceeding should be instituted which affected the question we are here discussing. Considering this as an application here, what we have said in regard to the fitness of the parties would be determinative of the matter, and the record disclosing no condition inimicable to the welfare of the children, all parties interested should remain in the position in which they were when the appeal was taken.
The writ of prohibition is granted.
Holcomb, C. J., Main, Tolman, and Mitchell, JJ., concur.