J. L. R. (“Joseph”) and D. J. B. (“Della,” a fictitious name) appeal from an order of the Kidder County juvenile court determining that D. R. J. (“Darcy,” a fictitious name) is a deprived child and granting legal custody to Kidder County Social Service Board. Kent J. Higgins, guardian ad litem for Darcy, appeals that portion of the order granting physical custody of Darcy to her mother Della. We affirm as to deprivation and reverse, in part, as to custody.
This appeal involves some bizarre elements, both factual and procedural. Darcy was born out of wedlock on October 7,1974, to Della, who was born in 1956. Della lived with her baby, Darcy, in the home of Della’s mother, Gladys, from the time of Darcy’s birth until September of 1976 at which time Della, with Darcy, accompanied a man named Robert Gaub to the State of Washington. In October 1976, Della gave birth to another child, also out of wedlock. The status of Della’s second child is not an issue in these proceedings.
Sometime after the birth of the second child, Della left Gaub and began living with a Mr. Bath. In June 1977, Della called her mother, Gladys, to come to Washington to get Darcy. Della testified at the hearing before the juvenile court that her reason for asking Gladys to take Darcy was that Mr. Bath did not like children and Della was afraid for Darcy’s safety. Della and Mr. Bath were married in July 1977. Later that month Della and her husband came to Gladys’s home after riding a freight car to North Dakota. They were at Gladys’s home for about two weeks and then left with a carnival. Della called Gladys at regular intervals but did not visit Darcy for over a year and a half after that two-week visit. In June of 1978, Gladys reported to the Kidder County Social Service Board that Della had abandoned Darcy with her, and a temporary custody order was issued placing custody of Darcy with the Kidder *403County Social Service Board. Darcy remained in the physical custody of Gladys. Della was not notified of the temporary placement order until September 1978. Between July and September 1978, Della left Mr. Bath after he was arrested for a parole or probation violation and she returned to live with Mr. Gaub for a time. In September 1978, she left Mr. Gaub and began living with Joseph.
Joseph filed an admission acknowledging his paternity of Darcy and in January 1979 he received a certification of birth from the North Dakota Registrar of Vital Statistics naming himself and Della as the parents of Darcy. The acknowledgment of paternity by Joseph was apparently executed pursuant to Section 14-17-04(l)(e), N.D.C.C. This subsection provides that a man is presumed to be the natural father of a child if “he acknowledges his paternity of the child in a writing filed with the division of vital statistics . . . ” Joseph then petitioned the Kidder County district court for a writ of habeas corpus, naming the Kidder County Social Service Board as respondent, alleging that he was the father and natural guardian of Darcy, and that Darcy was being forcibly held and detained by Kidder County Social Services at the home of Gladys. In his petition he also alleged that the temporary order previously entered by the Kidder County juvenile court granting' temporary custody of Darcy to the Kidder County Social Service Board was invalid because Della had never been given notice of the proceedings. Subsequently Della moved to join Joseph’s petition for a writ of habeas corpus and the court permitted Della to join as a petitioner. Before that petition was heard, Michael Becker, Director of the Kidder County Social Service Board, filed a petition with the Kidder County juvenile court alleging that Darcy was a “deprived child” within the meaning of Chapter 27-20, N.D.C.C., the Uniform Juvenile Court Act. The petition alleged that Della had abandoned Darcy; that Gladys had cared for Darcy for nearly a year with little contact with Della; that Della was retarded and could not raise Darcy; that at the time of the temporary custody order Della’s whereabouts were unknown; that circumstances made it improbable for Joseph to be the natural father of Darcy; that Darcy was without proper parental care or control, subsistence, or other care necessary for her physical or emotional health or morals. Both Joseph’s petition for a writ of habeas corpus and Becker’s petition to have Darcy declared a deprived child were heard by Judge Glaser at the same time, with the consent of the parties.1
During the course of the hearing Gladys, Darcy’s grandmother, and Gladys’s husband, Jonathon, moved to intervene in the proceedings. That motion was allowed, although the juvenile court expressed its belief that the grandparents did not have any standing to intervene in a juvenile proceeding before it reached a dispositional stage, and reaffirmed that view in its memorandum opinion. Following the hearing the juvenile court denied Joseph’s petition for a writ of habeas corpus, determined that Darcy is a deprived child, and gave legal custody of Darcy to the Kidder County Social Service Board but granted physical custody to Della. The juvenile court subsequently granted a stay of its order granting physical custody to Della. Further facts will be *404discussed as we consider the various issues raised by the parties.
Joseph and Della have not appealed from that portion of the trial court’s order denying the petition for a writ of habeas corpus.2 However, they have raised as error on appeal the admission of the results of their blood tests taken by the order of the juvenile court and admitted into evidence. During the course of the proceeding the question of whether or not Joseph was the natural father of Darcy became an issue. Kidder County Social Service Board, Darcy’s guardian ad litem, and Gladys and Jonathon all questioned whether or not Joseph was Darcy’s natural father.
Joseph and Della both testified that they had known each other for several years, that Joseph first met Della during a five-minute bus stop when the bus he was riding stopped in Tuttle, that on many later occasions he drove from South Dakota to Tuttle to see Della, and that he was the natural father of Darcy. Gladys testified that Della told her that another man was Darcy’s father; that Gladys never knew and had never heard of Joseph until several years after Darcy was born. Other parties presented testimony which contradicted Joseph’s and Della’s testimony. In order to verify Joseph’s presumed paternity of Darcy the trial court ordered blood tests of Darcy, Joseph, and Della. Those results indicated that Joseph could not be Darcy’s natural father.
Joseph and Della argue that the trial court applied the provisions of Chapter 14-17, N.D.C.C., the Uniform Parentage Act, in ordering and admitting the blood tests. They point out that the Act applies in instances where parentage is an issue, but it does not apply where deprivation of a child is an issue. They urge the evidence should not have been admitted because it had no probative value relating to the issue to be decided and it was of a prejudicial nature. That position is not well taken. Based oh his acknowledgment of paternity, Joseph petitioned for a writ of habeas corpus. Della later joined in that petition but Joseph did not withdraw. He was and continues to be a central figure in these proceedings. But if Joseph is not the natural father of Darcy, he has no standing to seek a writ of habeas corpus concerning her custody. Absent paternity, he has no legal relationship to Darcy.
Joseph’s petition for a writ of habeas corpus, which the court was hearing concurrently with the application to have Darcy declared a deprived child, relied upon Darcy’s Certification of Birth which Joseph obtained from the Division of Vital Records after acknowledging he was the natural father of Darcy. Section 14-17-04(l)(e), N.D.C.C., the Uniform Parentage Act, provides that a man is presumed to be the natural father of a child if, while the child is under the age of majority, the man “acknowledges his paternity of the child in a writing filed with the division of vital statistics of the state department of health, which shall promptly inform the mother of the filing of the acknowledgment, and she does not dispute the acknowledgment within a reasonable time after being informed thereof, in a writing filed with the division of vital statistics of the state department of health. . . . ”
Subsection 2 of Section 14-17-04 clarifies the presumption of paternity. It provides, in part:
“2. A presumption under this section may be rebutted in an appropriate action only by clear and convincing evidence. . . . ”
Joseph brought the petition for a writ of habeas corpus against the Kidder County Social Service Board basing his right to do so on his acknowledgment of paternity. Joseph’s petition for a \yrit of *405habeas corpus was being heard, without objection, concurrently with the petition to have Darcy declared a deprived child. Although a petition for a writ of habeas corpus may not be the usual type of action in which to have paternity determined, Joseph, by bringing the petition for a writ of habeas corpus, placed in issue the question of his paternity based on his acknowledgment of paternity under the Uniform Parentage Act. The court was justified in ordering the blood tests and receiving the results of those tests in evidence. Joseph, who used the Uniform Parentage Act to acknowledge his paternity and, based on the statutory presumption created by that acknowledgment, brought the petition for a writ of habeas corpus, cannot complain if other provisions of the Act are used to refute his claim of paternity.
Furthermore, in its findings of fact the juvenile court stated:
“Although [Joseph] is the presumed father of [Darcy], having formally acknowledged her paternity, and although [Della’s] testimony was that only [Joseph] could be [Darcy’s] father, [Della’s] and [Joseph’s] testimony provide clear and convincing evidence that their accounts are complete fabrications, and the blood test evidence shows beyond any reasonable doubt that [Joseph] is not [Darcy’s] father."
In its memorandum opinion the juvenile court stated:
“Even though my initial assessment of the evidence was that it was clear and convincing that [Joseph] was not the father, blood tests were ordered. The blood tests likewise show beyond any reasonable question that [Joseph] is not the father of the child.”
It is apparent from reading the findings of the juvenile court that it would have reached the same conclusion without the blood tests. Furthermore, Joseph’s and Della's insistance that Joseph was Darcy’s natural father despite substantial evidence to the contrary is a factor the juvenile court had a right to consider in awarding custody of Darcy. The juvenile court did not err in receiving in evidence the results of the blood tests.
Joseph and Della also take issue with that portion of the juvenile court’s order determining that Darcy is a deprived child and placing her legal custody with the Kidder County Social Service Board. As all parties point out, in an appeal from the determination of a juvenile court that a child is deprived our scope of review is broader than it is in other cases appealed to this court. Although we give appreciable weight to the findings of the juvenile court, we are not bound by the “clearly erroneous” standard of Rule 52(a), N.D.R.Civ.P., and we re-examine the evidence in a manner comparable to that under the former trial de novo. E. g., In Interest of S. W., 290 N.W.2d 675 (N.D.1980); In Interest of J. A., 283 N.W.2d 83 (N.D.1979).
A “deprived child” is defined by Section 27-20-02(5), N.D.C.C., as a child who:
“a. Is without proper parental care or control, subsistence, education as required by law, or other care or control necessary for his physical, mental, or emotional health, or morals, and the deprivation is not due primarily to the lack of financial means of his parents, guardian, or other custodian;
“b. Has been placed for care or adoption in violation of law; or
“c. Has been abandoned by his parents, guardian, or other custodian.”
We reviewed previous decisions construing this section in In Interest of J. K. S., 274 N.W.2d 244 (N.D.1979), stating:
“A summary of our previous decisions construing this section is found in In Interest of L. R. S., 271 N.W.2d 562 (N.D.1978). That decision and other cases referred to therein indicate:
“1. The term ‘proper care,’ as used in Section 27-20-02(5)(a), N.D.C.C., means the parents’ conduct in raising their children must satisfy the minimum standards of care which the community will tolerate.
*406“2. Evidence that compares the child-rearing skills of the natural parents with those of the foster parents will not alone support a finding of deprivation if the parents’ efforts meet the minimum standards of care.
“3. Lack of cleanliness of the home does not alone establish deprivation.
“4. The finding of poverty or lack of education or culture is not sufficient to establish deprivation.
“5. Parents have a constitutional right to the custody and companionship of their children, but this right is not absolute and parents are not entitled to the custody of their children under all circumstances.
“6. Parents are entitled to a presumption that they are fit parents, and the burden of disproving this presumption of parental fitness is on the challenger.
“7. Deprivation must be shown by clear and convincing evidence.
“In addition, we have indicated reluctance to remove a child from the parents unless ‘diligent effort has been made to avoid such separation,’ and unless it is necessary to prevent serious detriment to the welfare of the child. Bjerke v. D. T., 248 N.W.2d 808, 814 (N.D.1976), quoting In re Klugman, 256 Minn. 113, 97 N.W.2d 425, 429 (1959). We have also indicated that we are aware of the argument that it is dangerous to allow social workers to determine how a family is run. Bjerke, supra, 248 N.W.2d at 814.” 274 N.W.2d at 249.
In addition to the facts we have already recited herein, which are uncontroverted, the juvenile court found that Della and Joseph are presently married to other persons but are living together and have declared their intention to marry as soon as their divorces can be obtained; that Della is somewhat retarded but not to the extent that she cannot care for her daughter. There is some testimony that Darcy was not properly fed and cleaned, although Joseph and Della take issue with that interpretation of the facts. More important, however, the facts show that Della’s concern for her child is almost solely determined by the man with whom she is living at a given time. Della went to Washington with Gaub. She had another daughter by Gaub. During that time she had Darcy in her custody. She left Gaub and moved in with Bath. Shortly thereafter Della requested Gladys to come to Washington to take Darcy home to North Dakota. Della testified that Bath did not care for- Darcy and had plans for Della which did not include Darcy. When Gladys arrived in Washington she found Darcy bruised, flea-bitten, and dirty. Although Della testified that the flea bites were received while Darcy was with a baby sitter, that testimony is not convincing. After Gladys took Darcy from Washington to North Dakota, Della married Bath.
Joseph and Della argue that Della was wise in asking Gladys to take Darcy because Bath did not like children. They cite In re J. V., 185 N.W.2d 487 (N.D.1971), in which a mother placed her child in a foster home for three years because she was living with an alcoholic husband who failed to provide support for his family for many years and the mother herself became nervous and distraught because of the hopelessness of the situation and feared she, herself, might harm the children. This court held that the mother used good judgment in taking that action and that the child was not deprived. In re J. V. is not applicable here. Della was not married to Bath at the time she asked Gladys to take Darcy. Della did not have to live with Bath. She knew before she married him that he did not like children. Nevertheless, after Gladys took Darcy to North Dakota Della did marry Bath.
In In re J. V., the mother was attempting to correct a situation in which she and the children were caught. In Della’s case she voluntarily stepped into a legal involvement — marriage—with a man who, by Della’s own testimony, did not like children and did not want Darcy living with them.
Sometime later, after Bath was jailed for violating probation, Della moved back to live with Gaub. It was during the time she was living with Gaub that Joseph moved into an apartment across the hall and short*407ly thereafter Della moved in with Joseph. Joseph apparently is interested in having Darcy live with him and Della. Various motives are attributed to Joseph’s interest in Darcy, but those motives do not concern us at this time. Joseph’s interest does, however, explain why Della is now interested in custody of Darcy although she was not interested in her while she was living with and subsequently married to Bath.
In its memorandum opinion the juvenile court stated:
“[Della] has been drifting from one man to another. The child is of tender years, so an actual adverse effect upon its moral and emotional health arising from this environment cannot be demonstrated. But this is not the test. The test is whether the child is without the care necessary for its emotional health and moral development. The child has lacked that care while in the custody of [Della].”
We concur with the conclusion of the juvenile court that Darcy is a deprived child. Our review of the entire record, including the transcript of testimony, causes us to conclude that Della, although she may be able to physically care for Darcy, is manipulated by the man with whom she happens to be living. In past instances the influence of those men has resulted in less than adequate care for Darcy. From the testimony it appears that the man with whom Della is living must not merely be neutral in his attitude toward Darcy but must, in fact, assist Della in properly caring for the child. Della’s pattern of moving from one man to another does not cause us to conclude that matters will necessarily improve in the future.
We have already noted that deprivation must be proved by clear and convincing evidence and that the burden of supplying such proof is upon the party challenging the rights of the natural parents. Sec. 27-20-29(3), N.D.C.C.; Bjerke v. D. T., 248 N.W.2d 808 (N.D.1976). We conclude that the record in this case meets the requirements and amply supports the finding by the juvenile court that Darcy is deprived.
Joseph and Della have also raised as an issue on appeal the determination of the juvenile court to place legal custody of Darcy with the Kidder County Social Service Board. Because this issue is closely related to the issues raised by the guardian ad litem in his appeal, we will consider that issue with the appeal of the guardian ad litem.
APPEAL OF THE GUARDIAN AD LITEM
Darcy’s guardian ad litem has appealed that portion of the juvenile court’s decision which grants physical custody of Darcy to Della. This court has previously indicated that Chapter 27-20 requires two proceedings in a deprivation or termination proceeding. The first proceeding is to determine whether or not the child is deprived. If the juvenile court'finds the child is deprived, a separate proceeding is conducted to determine the disposition of the child. In the first phase (referred to as the adjudicatory phase), the only question to determine is whether or not the child is “deprived” within the meaning of Section 27-20-02(5), N.D.C.C. The primary issue in that phase is whether or not there is clear and convincing evidence the child is deprived. If the child is found to be deprived, the second phase (referred to as the disposi-tional phase) is conducted and in such instance the issue is the best interests of the child. The division of the hearings may be significant because evidence concerning the suitability of one home for the placement of the child in comparison to another home is properly admissible only in the dispositional phase. See, e. g., In Interest of T. M. M., 267 N.W.2d 807 (N.D.1978). In the instant case there was no apparent division in the hearing between the adjudicatory phase and the dispositional phase. In fact, the determination that Darcy was a deprived child was not made until the hearing was closed and the memorandum opinion of the juvenile court and the findings of fact, conclusions of law, and order contained determinations as to both deprivation and disposition. Again, however, neither party has raised as an issue on appeal the question of *408whether or not there should have been separate proceedings.
The guardian ad litem has raised as an issue the question of whether or not the juvenile court, after determining Darcy was deprived, erred in applying a “continuation of deprivation” standard in making its disposition instead of the “best interest of the child” standard. As we have already noted, the juvenile court granted legal custody of Darcy to the Kidder County Social Service Board for a period of two years with physical custody granted to Della. The basis for such disposition is contained in the following findings of the juvenile court:
“11) [Della] has an eighth grade education and is apparently somewhat retarded, although not to the extent to suggest that she cannot care for her daughter.
“12) Both [Della] and [Joseph] are presently married to other persons, but are living together and have declared their intention to get married as soon as their divorces can be obtained.”3
A somewhat clearer explanation of the juvenile court’s reasoning is found in its memorandum opinion:
“There is nothing in the evidence to suggest that [Della] does not have the mental capacity to care for her child. During the course of the hearings one of [Joseph’s] children was present. The child was remarkably well behaved, and the relationship between her and [Della] was a positive one. [Della] is living with [Joseph], who appears to be of above average intelligence. It is their intention to marry as soon as they are able to do so. [Joseph’s] presence in the family unit is a factor to be considered with respect to the question of whether deprivation exists.
■ “[Della] has been drifting from one man to another. The child is of tender years, so an actual adverse effect upon its moral and emotional health arising from this environment cannot be demonstrated. But this is not the test. The test is whether the child is without the care necessary for its emotional health and moral development. The child has lacked that care while in the custody of [Della]. I find, therefore, that [Darcy] is a deprived child.
“It is not possible to know whether this pattern of [Della’s] life will continue. The evidence suggests the contrary may be true. [Della] has been living with [Joseph] for some time. They state it is their intention to marry as soon as possible and return to Washington. The past, however, is prologue, and the possibility of the pattern continuing is a real one. It would not be in the best interest of the child, therefore, to permit [Della] unrestricted rights of custody.
“[Della] will be given the physical custody of the child. Legal custody of the. child will be granted to the Kidder County Social Services Board for a period of two years. If [Della] returns to Washington, legal custody will be transferred to an appropriate agency of that state in accordance with Sec. 27-20-30(l)(c), N.D. C.C. The agency having legal custody shall have the right to monitor the care being given the child and the conditions under which it is living. In the event it is made to appear to the Court that the conditions causing deprivation continue to exist or that circumstances are such as to cause deprivation, physical custody of the child will be ordered changed and an appropriate disposition made in the light of events then existing.” [Emphasis supplied.]
We are not convinced, as is the guardian ad litem, that the juvenile court was using a “continuing deprivation” test in the disposition phase of its decision. Rather, we believe the court was questioning whether or not the causes of deprivation would continue. The court, although noting that Della’s past actions of drifting from one man to another may continue, expresses some *409thought that because Della had been living with Joseph for some time that might not be the case in the future.
Despite the juvenile court’s optimism concerning Della’s future with Joseph, we cannot ascertain in its findings or memorandum opinion that the best interests of Darcy were considered. Perhaps this is because the combined hearing did not result in a clear separation of the two determinations to be made by the juvenile court, i. e., whether or not Darcy is a deprived child and, if she is a deprived child, what the disposition should be. In any event, we cannot conclude that the court should “take a chance” with Darcy’s well-being on the possibility that Della will change her method of living. Lorraine Gross, a social worker with the Kidder County Social Service Board, did visit Joseph and Della’s home. In her testimony to the court she indicated she believed Joseph and Della could meet Darcy’s physical needs if she were placed with them and that they would do their best to care for her adequately. It may be that Joseph and Della will be able to establish a proper home for Darcy. At the present time, however, both Joseph and Della, although living together, are married to other persons. The testimony indicates that they would have secured divorces in the State of Washington if it were not for the proceedings involving Darcy, i. e., they did not have sufficient funds to return to Washington to secure those divorces, return to North Dakota, and again return to Washington where they intended to live. But even if Joseph and Della obtain divorces from their respective spouses and marry, there is no assurance of a stable home life. Joseph has been married four times before, and Della has been involved with a series of men. Because Della’s past involvement with, and manipulation by, different men has resulted in Darcy’s deprivation, we are not ready to accept as fact a statement that because Della is now living with Joseph and intends to marry him things will be different for Darcy. In view of past events, Joseph and Della’s relationship should be legalized and their home established in order to convince us that Darcy’s best interests would be served by placing her in Della’s legal and physical custody.
Furthermore, the juvenile court’s order does not appear to consider the effect on Darcy of a transfer of physical custody from Gladys, whom Darcy refers to as “mother,” to Della, whom Darcy has not seen for an extended period since 1977. We conclude that the juvenile court’s order as to disposition is not in Darcy’s best interests. In reaching this conclusion we again emphasize that deprivation has been established and we are concerned in this issue only with Darcy’s best interests.
Additionally, because the juvenile court was obviously uncertain that Darcy’s best interests would be served by placing her in Della’s physical custody, it placed legal custody with the Kidder County Social Service Board in order to monitor Darcy’s care while she was with Della. The juvenile court’s order placing Darcy in the legal custody of the Kidder County Social Service Board with physical custody in Della is a disposition authorized by statute. Sec. 27— 20-30, N.D.C.C. Apparently because Joseph and Della had informed the court they intended to return to Washington, the order also provided that if Della did return to Washington legal custody would be transferred to an appropriate agency of that State in accordance with Section 27-20-30(l)(c), N.D.C.C. That section provides that after determining a child is deprived the court may:
“c. Without making any of the foregoing orders transfer custody of the child to the juvenile court of another state if authorized by and in accordance with section 27-20-39 if the child is or is about to become a resident of that state.” [Emphasis ours.]
The application of this provision in this instance may be in question because the trial court did make an order placing legal custody of Darcy with the Kidder County *410Social Service Board and physical custody with Della. More important, however, Section 27-20-39, to which Section 27-20-30(l)(c) refers, requires the receipt and filing of an acceptance of jurisdiction by the court of the other State before the courts of this State may transfer jurisdiction of the child.4 The record is bare of any request from the court of this State to a court of another State to accept jurisdiction and, of course, bare of any acceptance of the court of another State of jurisdiction of Darcy. Although the trial court attempted to meet its concern by transferring jurisdiction of Darcy to an appropriate agency of the State to which Della might move, that attempt does not comply with the statutory requirements in Section 27-20-39, N.D.C.C.
Darcy lived with Gladys and Della from her birth until September 1976, when Della took Darcy with her and accompanied Gaub to Washington. The testimony is abundantly clear that during the time Darcy and Della lived with Gladys it was Gladys who provided most of D.arcy’s needs. Darcy called Gladys “mother” but called Della by her name. In June 1977, at Della’s request, Gladys went to Washington and took Darcy back to North Dakota. Since that time Darcy has resided with Gladys and Gladys’s husband, Jonathon. This court has previously concluded that a change in custody from grandparents who are “psychological parents" to a natural father who has neglected the child will not be ordered unless a change in custody is necessary to promote and protect a child’s welfare. In Interest [Custody] of D. G., 246 N.W.2d 892 (N.D.1976). Applying the “best interest of the child standard” the court held that grandparents who had raised a six-year-old child in their home from birth were entitled to custody as against a father who had abandoned the child and provided little support or care even when contact was re-established, stating:
“In the instant case, the child has lived with his grandparents for his entire life. [The transfer of custody ordered by the juvenile court was stayed during the pendency of this appeal.] He is loved there and cared for there. He and his grandfather enjoy a father-son relationship. It is the only home he has ever known, and the grandparents are the persons to whom he turns for help and reassurance.
“On the other hand, the child hardly knows his father and does not consider him to be his father. And the father admits to never having kissed the child or shown him any affection. It is no doubt true that the father, with his present wife, is more settled than he was when he left his son. We do not feel, however, that this potential for a good family life is enough to offset the detrimental effects of a change in custody on the child.
“Continuity in a child’s life, especially a young child, is one of the most important factors in determining that child’s best interests. .
“In this case, continuity in the child’s life can be preserved by maintaining custody with the grandparents. . . .” 246 N.W.2d at 895.
This court reversed the trial court’s transfer of custody to the father and awarded custody to the grandparents. Although deprivation was not an issue in In Interest of D. G., custody was an issue and the best interest of the child was the test, just as it is the test in considering disposition of a deprived child. The similarity between the circumstances in In Interest of D. G. and the instant case is obvious. See also In Interest of J. O., 250 N.W.2d 256 (N.D.1977).
We conclude that Darcy’s best interest would be served at this time by leaving physical custody with Gladys, not transferring physical custody to Della.
*411The trial court’s order determining that Darpy is a deprived child and granting legal custody to the Kidder County Social Service Board is affirmed. The trial court’s order granting physical custody of Darcy to Della, the mother, and denying physical custody to Gladys, the grandmother, is reversed. We remand to the juvenile court with directions to vacate the order granting physical custody of Darcy to Della and with the further directions to enter an order granting physical custody to Gladys. Upon remand, the juvenile court may impose such conditions in the custody order as it deems necessary and proper.
ERICKSTAD, C. J., and PEDERSON, PAULSON and SAND, JJ., concur.. Section 27-20-24(1), N.D.C.C., provides that hearings under Chapter 27-20 are to be conducted by the court without a jury “separately from other proceedings not included in section 27-20-03.” In In Interest of T. M. M, 267 N.W.2d 807 (N.D.1978), the court held that hearings conducted to determine whether or not a child is deprived must be conducted separately from divorce-related custody hearings and reversed an order of a juvenile court stating that “the deprivation hearing was intermingled with the hearing on the motion to modify the divorce decree to such an extent as to constitute reversible error.” 267 N.W.2d at 810. In this instance the hearing on the petition for a writ of habeas corpus was combined with the hearing on deprivation. However, the matters were combined with the consent of all the parties, and the combined hearings have not been challenged on appeal. In In Interest of T. M. M, the court found that combining the . two proceedings in one hearing resulted in confusion and adversely affected the mother’s right to resist the deprivation petition. No such difficulty is evident in the record in this case.
. The order denying an application for a writ of habeas corpus ordinarily is not appealable. E. g., Ex parte Simonson, 54 N.D. 164, 209 N.W. 211 (1926). If the district court denies the application for a writ of habeas corpus, an application may be made requesting the Supreme Court to exercise its original jurisdiction. Sec. 32-33-06, N.D.C.C. However, where a habeas corpus proceeding is instituted to determine the custody of a child, it is tried as an equitable action and an appeal is permitted. See In re Wagner, 84 N.W.2d 587 (N.D.1957).
. The findings of fact, conclusions of law, and order were prepared by the guardian ad litem at the order of the court.
. We have previously expressed our doubts about placing legal custody of a deprived child with an agency of this State and, at the same time, granting physical custody of that child to a parent who intends to remove the child from this State. See In Interest of J. K. S., 274 N.W.2d 244 (N.D. 1979).