
488 N.W.2d 366 (1992)
241 Neb. 368
Kristine A. UHING, for Herself and on Behalf of Her Minor Child, Caeli JONES, Appellant,
v.
Ann UHING, Appellee.
No. S-91-743.
Supreme Court of Nebraska.
August 28, 1992.
*368 Connie Kearney, of Legal Aid Society, Inc., Omaha, for appellant.
S. Caporale, Omaha, for appellee.
BOSLAUGH, WHITE, SHANAHAN, GRANT, and FAHRNBRUCH, JJ., and COLWELL, District Judge, Retired.
SHANAHAN, Justice.
Kristine Uhing, biological mother of Caeli Jones, appeals from the decision of the district court for Douglas County, which denied Kristine Uhing's petition for habeas corpus relief concerning her daughter, Caeli, who is in the custody of Ann Uhing, the child's grandmother.

HABEAS CORPUS AND CHILD CUSTODY
Habeas corpus is a civil remedy constitutionally available in a proceeding to *369 challenge and test the legality of a person's detention, imprisonment, or custodial deprivation of the person's liberty. See, U.S. Const, art. I, § 9; Neb. Const, art. I, § 8; In re Application of Tail, Tail v. Olson, 144 Neb. 820, 14 N.W.2d 840 (1944); Robertson v. Div. of Parole, 67 N.Y.2d 197, 492 N.E.2d 762, 501 N.Y.S.2d 634 (1986).
A habeas corpus proceeding is appropriate to test the legality of custody and best interests of a minor, when the party having physical custody of the minor has not acquired custody under a court order or decree. See, Shoecraft v. Catholic Social Servs. Bureau, 222 Neb. 574, 385 N.W.2d 448 (1986); Nielsen v. Nielsen, 207 Neb. 141, 296 N.W.2d 483 (1980); In re Application of Reed, 152 Neb. 819, 43 N.W.2d 161 (1950).

STANDARD OF REVIEW
In an appeal from a decision in a habeas corpus action involving custody of a child, an appellate court's review of a trial court's judgment is de novo on the record to determine whether there has been an abuse of discretion by the trial judge, whose judgment will be upheld in the absence of an abuse of discretion. In such de novo review, when the evidence is in conflict the appellate court considers, and may give weight to, the fact that the trial judge heard and observed the witnesses and accepted one version of the facts rather than another. See, L.G.P. v. Nebraska Dept. of Soc. Servs., 239 Neb. 644, 477 N.W.2d 571 (1991); Reynolds v. Green, 232 Neb. 60, 439 N.W.2d 486 (1989); Nielsen v. Nielsen, supra.
[A] judicial abuse of discretion exists when a judge, within the effective limits of authorized judicial power, elects to act or refrain from action, but the selected option results in a decision which is untenable and unfairly deprives a litigant of a substantial right or a just result in matters submitted for disposition through a judicial system.
State v. Juhl, 234 Neb. 33, 43, 449 N.W.2d 202, 209 (1989). Accord, In re Interest of L.V., 240 Neb. 404, 482 N.W.2d 250 (1992); Ensrud v. Ensrud, 230 Neb. 720, 433 N.W.2d 192 (1988); Younkin v. Younkin, 221 Neb. 134, 375 N.W.2d 894 (1985).

FACTUAL BACKGROUND
On August 4, 1988, Caeli Jones was born to Kristine, age 21, who was married to Clifford Jones. Apparently, Kristine and Clifford were separated at the time of Caeli's birth. Because Kristine was unemployed at that time and financially unable to provide for Caeli, Kristine and Caeli moved into the residence of Kristine's parents. The marriage between Kristine and Clifford Jones was dissolved in August 1989.
From the moment that Kristine and Caeli moved into the Uhing residence, Ann Uhing, Caeli's grandmother, attended to the child, but generally disagreed with Kristine's methods in rearing Caeli. This disagreement and conflict eventually resulted in Kristine's exclusion from participation in child care for Caeli. Throughout the 1 1/2 years that Kristine lived with the Uhings, she had several part-time jobs; for example, she worked in telemarketing, was a motel reservationist, was employed at St. Luke's Day Care Center, and had a job with First Data Resources. From the age of 16 years, Kristine had suffered anxiety attacks for which she was taking medication to alleviate the problem. In December 1989, Kristine was discharged from her employment at First Data as the result of absenteeism on account of her illness. The differences between Ann Uhing and Kristine concerning Caeli continued and culminated with Ann Uhing's request that Kristine move out of the Uhing residence. Kristine left in January 1990 and was still unable to provide financially for Caeli. For that reason, Caeli remained with her grandparents.
In February 1990, Ann Uhing filed a petition for temporary guardianship. While Ann Uhing's petition for guardianship was pending, Kristine shared an apartment with a girl friend, Tammy Barnes, and Tammy's 31/2-year-old daughter, Gina. During this time Kristine attempted to maintain her relationship with Caeli and, on several occasions, asked Ann Uhing for *370 permission to take Caeli shopping or to the zoo and requested that Caeli be allowed to accompany Kristine on a company picnic. Ann Uhing refused to allow such outings, but permitted Kristine to visit Caeli in the Uhing home. In the summer of 1990, Kristine worked in a bar, but later in the year returned to employment with First Data, where she earned a net monthly income of $750. Kristine is a high school graduate and has no history of any arrest, use of drugs, or alcohol problem, and has no psychological or major health difficulty that restricts her activities or which might adversely affect her relationship with Caeli.
Ann Uhing's petition for temporary guardianship was dismissed on April 5, 1991, "for lack of prosecution." On May 3, Kristine wrote to Ann Uhing and informed her that Kristine was employed and had "adequate housing" for Caeli, whom Kristine wanted to pick up from the Uhing house. When Ann Uhing refused to surrender Caeli, Kristine filed her petition for habeas corpus relief. At the time of the habeas corpus hearing on June 28, Kristine, then 24 years old, shared an apartment with a man named "John Kratina" and had made arrangements for Caeli to attend preschool in the event that she obtained custody of the child.

DISTRICT COURT'S DECISION At the conclusion of the hearing, the district court remarked:
I am going to make a finding that it is in the best interest of Caeli that she remain with the respondent at this time.
.... I would anticipate that once the petitioner has established a little bit better track record than what she has in the past, that Caeli would probably be with her.
There is no question that a child should ordinarily be with the natural parent....
.... But I am saying that I think at the present time it is for the best interest of Caeli that her custody remain with the respondent.
The district court then denied habeas corpus relief for return of Caeli to Kristine. Thus, the district court's judgment denying Kristine Uhing custody of her child, Caeli Jones, for an indeterminate period effectively foreclosed the parent-child relationship for an indefinite period, with the practical and very likely effect of eventually dissolving the parent-child relationship between Kristine and Caeli.

ASSIGNMENTS OF ERROR
Kristine Uhing's assignments of error converge in the following: (1) The district court abused its discretion by failing to properly consider Kristine's superior right as Caeli's biological mother, who is fit to have child custody, and (2) the district court abused its discretion in failing to grant habeas corpus relief to Kristine and thereby return Caeli to Kristine.

CONSTITUTIONALLY PROTECTED PARENT-CHILD RELATIONSHIP
Although this court, considering a child custody case, has expressed that the "question present in every habeas corpus case is the best interests of the child," L.G.P. v. Nebraska Dept. of Soc. Servs., 239 Neb. 644, 646, 477 N.W.2d 571, 573 (1991), we cannot overlook or disregard that the "best interests" standard is subject to the overriding recognition that "the relationship between parent and child is constitutionally protected," Quilloin v. Walcott, 434 U.S. 246, 255, 98 S.Ct. 549, 554, 54 L.Ed.2d 511 (1978). See, also, Santosky v. Kramer, 455 U.S. 745, 102 S.Ct. 1388, 71 L.Ed.2d 599 (1982); Shoecraft v. Catholic Social Servs. Bureau, 222 Neb. 574, 385 N.W.2d 448 (1986). "[A] parent's desire for and right to `the companionship, care, custody, and management of his or her children' is an important interest that `undeniably warrants deference and, absent a powerful countervailing interest, protection.'" Lassiter v. Department of Social Services, 452 U.S. 18, 27, 101 S.Ct. 2153, 2159-60, 68 L.Ed.2d 640 (1981). As the U.S. Supreme Court stated in Quilloin, 434 U.S. at 255, 98 S.Ct. at 555:

*371 We have little doubt that the Due Process Clause would be offended "[i]f a State were to attempt to force the breakup of a natural family, over the objections of the parents and their children, without some showing of unfitness and for the sole reason that to do so was thought to be in the children's best interest." Smith v. Organization of Foster Families, 431 U.S. 816, 862-863 [97 S.Ct. 2094, 2119, 53 L.Ed.2d 14] (1977) (Stewart, J., concurring in judgment).
Cf., Wisconsin v. Yoder, 406 U.S. 205, 92 S.Ct. 1526, 32 L.Ed.2d 15 (1972) (parents have fundamental liberty interest in right to teach their children religious beliefs and moral standards); Stanley v. Illinois, 405 U.S. 645, 92 S.Ct. 1208, 31 L.Ed.2d 551 (1972) (the integrity of the family unit is protected by the due process clause of the 14th Amendment); Pierce v. Society of Sisters, 268 U.S. 510, 45 S.Ct. 571, 69 L.Ed. 1070 (1925) (parents have a fundamental liberty interest in directing the education of their children); In re Interest of R.G., 238 Neb. 405, 470 N.W.2d 780 (1991) (the parent-child relationship involves a liberty interest).
Consequently, in the context of a marital dissolution action, we recently stated in Stuhr v. Stuhr, 240 Neb. 239, 245, 481 N.W.2d 212, 216 (1992):
In the absence of a statutory provision otherwise, in a child custody controversy between a biological or adoptive parent and one who is neither a biological nor an adoptive parent of the child involved in the controversy, a fit biological or adoptive parent has a superior right to custody of the child.
A parent's superior right to custody of a child was also recognized in Nielsen v. Nielsen, 207 Neb. 141, 149, 296 N.W.2d 483, 488 (1980):
Where the custody of a minor child is involved in a habeas corpus action, the custody of the child is to be determined by the best interests of the child, with due regard for the superior rights of a fit, proper, and suitable parent.
The courts may not properly deprive a parent of the custody of a minor child unless it is affirmatively shown that such parent is unfit to perform the duties imposed by the relationship, or has forfeited that right.
The right of a parent to the custody of his minor child is not lightly to be set aside in favor of more distant relatives or unrelated parties, and the courts may not deprive a parent of such custody unless he is shown to be unfit or to have forfeited his superior right to such custody.
Accord Peterson v. Peterson, 224 Neb. 557, 399 N.W.2d 792 (1987). See, also, Marcus v. Huffman, 187 Neb. 798, 194 N.W.2d 221 (1972); Carlson v. Wivell, 181 Neb. 877, 152 N.W.2d 98 (1967).
A biological or adoptive parent's superior right to custody of the parent's child is acknowledgment that parents and their children have a recognized unique and legal interest in, and a constitutionally protected right to, companionship and care as a consequence of the parent-child relationship, a relationship that, in the absence of parental unfitness or a compelling state interest, is entitled to protection from intrusion into that relationship. Hence, the parental superior right to child custody Protects not only the parent's right to the companionship, care, custody, and management of his or her child, but also protects the child's reciprocal right to be raised and nurtured by a biological or adoptive parent. See Bellotti v. Baird, 443 U.S. 622, 99 S.Ct. 3035, 61 L.Ed.2d 797 (1979) (both parents and children in a familial relationship are protected by the U.S. Constitution). Establishment and continuance of the parent-child relationship "`is the most fundamental right a child possesses to be equated in importance with personal liberty and the most basic constitutional rights.'" Johnson v. Hunter, 447 N.W.2d 871, 876 (Minn.1989) (quoting from Ruddock v. Ohls, 91 Cal.App.3d 271, 154 Cal. Rptr. 87 (1979)). See, also, In re Adoption of A.G.K., 728 P.2d 1 (Okla.App.1986) (a child has a constitutionally protected right in preserving parent-child relationship); Com., Dept. of Social Services v. Johnson, 7 Va.App. 614, 376 S.E.2d 787 (1989) (a child has a fundamental right in establishment *372 and continuation of the parent-child relationship).
Accordingly, a court may not, in derogation of the superior right of a biological or adoptive parent, grant child custody to one who is not a biological or adoptive parent unless the biological or adoptive parent is unfit to have child custody or has legally lost the parental superior right in a child.
Stuhr v. Stuhr, 240 Neb. at 246, 481 N.W.2d at 217.
"Parental unfitness means a personal deficiency or incapacity which has prevented, or will probably prevent, performance of a reasonable parental obligation in child rearing and which has caused, or probably will result in, detriment to a child's well-being."
Ritter v. Ritter, 234 Neb. 203, 210, 450 N.W.2d 204, 210 (1990).

DE NOVO REVIEW
In reaching its decision, the district court proceeded immediately and directly to the question whether Caeli Jones' best interests required that she remain with her grandmother, without consideration and irrespective of Kristine Uhing's maternal fitness in reference to the parental superior right to child custody.
As far back as Norval v. Zinsmaster, 57 Neb. 158, 77 N.W. 373 (1898), a habeas corpus proceeding involving child custody, the court expressed what remains the law of Nebraska concerning preeminence of the parental right to custody of a minor. Annie Norval appealed from denial of her request for habeas corpus relief concerning custody of her young daughters, who were in the custody of their paternal grandfather. The girls' grandparents loved the children and were able to provide somewhat better for the children's material necessities than could Annie Norval. Nothing indicated that Annie Norval, who also loved the children, was unfit to have custody of her daughters. The Norval court relied on Comp.Stat. ch. 34, § 6 (1897), which in part provided: "The father and mother are the natural guardians of their minor children, and are equally entitled to their custody...." Insofar as the quoted material is concerned, chapter 34, § 6, is a verbatim predecessor of the current Nebraska statute, Neb.Rev.Stat. § 30-2608 (Reissue 1989). In reversing the district court's refusal to grant habeas corpus relief to Annie Norval, the court stated:
We are aware that this court has several times asserted that in such controversies as the present the order should be made with sole reference to the best interests of the child. But this has been broad language applied to special cases. The court has never deprived a parent of the custody of a child merely because on financial or other grounds a stranger might better provide. The statute declares and nature demands that the right shall be in the parent, unless the parent be affirmatively unfit. The statute does not make the judges the guardians of all the children in the state, with power to take them from their parents, so long as the latter discharge their duties to the best of their ability, and give them to strangers because such strangers may be better able to provide what is already well provided. If that were the law, it would be soon changed, by revolution if necessary.
57 Neb. at 161-62, 77 N.W. at 374. Consequently, as a result of Norval, the Nebraska rule became, and continues to be: In a parent's habeas corpus proceeding directed at child custody, a court may not deprive a parent of a minor's custody unless it is affirmatively shown that the parent seeking habeas corpus relief is unfit to perform the parental duties imposed by the parent-child relationship or has legally lost parental rights in the child. See, Marcus v. Huffman, 187 Neb. 798, 194 N.W.2d 221 (1972); Carlson v. Wivell, 181 Neb. 877, 152 N.W.2d 98 (1967); Walker v. Gehring, 172 Neb. 398, 109 N.W.2d 724 (1961); Lakey v. Gudgel, 158 Neb. 116, 62 N.W.2d 525 (1954); Lung v. Frandsen, 155 Neb. 255, 51 N.W.2d 623 (1952); In re Application of Schwartzkopf 149 Neb. 460, 31 N.W.2d 294 (1948). Apparently, the court in Marcus felt so strongly about the necessity for a showing of parental unfitness that the court suggested an interesting *373 analogy: If the evidence of unfitness is insufficient to justify termination of parental rights in an action maintained under the Nebraska Juvenile Code, similarly deficient evidence of parental unfitness in a habeas corpus proceeding prevents a court from granting child custody to one who is a stranger to the parent-child relationship.
Moreover, the fact that a stranger, that is, one outside the immediate family relationship, may be able to provide greater or better financial care or assistance for a child than can a parent is an insufficient basis to deprive a parent of the right to child custody. In re Interest of Stoppkotte, 210 Neb. 1, 312 N.W.2d 454 (1981); In re Interest of D., 209 Neb. 529, 308 N.W.2d 729 (1981); State v. Worrell, 198 Neb. 507, 253 N.W.2d 843 (1977); State v. Best, 173 Neb. 483, 113 N.W.2d 650 (1962); Young v. Young, 166 Neb. 532, 89 N.W.2d 763 (1958); Morehouse v. Morehouse, 159 Neb. 255, 66 N.W.2d 579 (1954); Clarke v. Lyon, 82 Neb. 625, 118 N.W. 472 (1908).
From our de novo review of the record, we conclude that the evidence is insufficient to establish Kristine Uhing is unfit to perform duties imposed by the parent-child relationship and, therefore, that the evidence fails to show that Kristine Uhing is unfit to have custody of Caeli Jones. It is beyond doubt that the district court, in deciding the issue of Caeli Jones' custody, used only the "best interests" standard to resolve the custody question and made no determination concerning Kristine's fitness for the custody of Caeli. Although Caeli's grandparents have commendably assisted Kristine Uhing in caring for Caeli when Kristine was unable to do so, and while it was apparent at the time of the habeas corpus hearing that Caeli might enjoy some economic advantages or benefit from continued presence in her grandparents' residence, neither of those circumstances, alone or joined with one another, justifies a judicial separation of Kristine from Caeli. Moreover, we revisit and emphasize the words of the U.S. Supreme Court in Quilloin v. Walcott, 434 U.S. 246, 255, 98 S.Ct. 549, 555, 54 L.Ed.2d 511 (1978):
We have little doubt that the Due Process Clause would be offended "[i]f a State were to attempt to force the breakup of a natural family, over the objections of the parents and their children, without some showing of unfitness and for the sole reason that to do so was thought to be in the children's best interest." Smith v. Organization of Foster Families, 431 U.S. 816, 862-863 [97 S.Ct. 2094, 2119, 53 L.Ed.2d 14] (1977) (Stewart, J., concurring in judgment).
Consequently, from our de novo review we conclude that Kristine Uhing has attempted to maintain and nurture a parental relationship with Caeli to the extent that Kristine is a fit and proper person for the care and custody of Caeli. The district court's judgment continuing Ann Uhing's custody of Caeli Jones in derogation of Kristine Uhing's parental right to custody was based solely on Caeli's "best interests," without reference to Kristine Uhing's fitness to have custody of Caeli. For that reason, the district court's judgment effectively forced a breakup of Kristine and Caeli as a family, a dissolution of the parent-child relationship without a showing of Kristine's unfitness toward Caeli. Hence, the district court's action in rejecting Kristine Uhing's superior parental right to custody of Caeli constitutes an abuse of discretion affecting both Kristine's and Caeli's substantial rights resulting from the parent-child relationship. Further, in considering Caeli's best interests under the circumstances, see Stuhr v. Stuhr, 240 Neb. 239, 481 N.W.2d 212 (1992), and Von Tersch v. Von Tersch, 235 Neb. 263, 455 N.W.2d 130 (1990), we conclude that custody of Caeli Jones should have been granted to Kristine Uhing.
Therefore, we reverse the district court's judgment and hereby grant habeas corpus relief to Kristine Uhing concerning Caeli Jones; that is, Kristine Uhing shall have custody of Caeli Jones in accordance with this opinion.
REVERSED.
CAPORALE, J., not participating.
