
963 So.2d 114 (2007)
J.W.
v.
C.H.
2050687.
Court of Civil Appeals of Alabama.
February 23, 2007.
Connie Cooper, Phenix City, for appellant.
Margaret Y. Brown, Auburn, for appellee.
MOORE, Judge.
These appeals arise from a judgment following an ore tenus proceeding in which the Russell County Juvenile Court concluded that A.H., a minor child, was "dependent," pursuant to § 12-15-1, Ala.Code 1975. Based on that finding, the trial court awarded custody of A.H. to C.H.J.W. appeals from the judgment awarding *116 C.H. custody of A.H.; C.H. cross-appeals from the trial court's earlier ruling, in which the trial court adjudicated J.W. to be the biological father of A.H.

Background
S.S. entered into a sexual relationship with C.H. while living with him in North Carolina in 2002. In 2004, while still in her relationship with C.H., S.S. also entered into a sexual relationship with J.W.S.S. became pregnant with A.H. When she learned of her pregnancy, she informed J.W. that he was the biological father of the baby, but, according to S.S., J.W. stated "he didn't want to be in [A.H.]'s life unless he was with the mother of the child he was going to raise." S.S. did not immediately inform C.H. of the paternity of the child so he believed he was the biological father during the pregnancy.
After A.H. was born, S.S. told C.H. of her sexual relationship with another man. Despite this information, C.H. stated he was willing to raise the child as his own and the two agreed C.H. would be A.H.'s father. C.H. signed the birth certificate as the father of A.H. Thereafter, S.S. and C.H. began raising A.H. together in Albany, Georgia.
When A.H. was approximately four or five months old, S.S. took A.H. and moved in with J.W. in Phenix City, Alabama C.H. paid child support to S.S. during this time. S.S. subsequently obtained genetic testing proving J.W. was the biological father of A.H. She sent these results to C.H., who then terminated child support payments.
S.S. moved out of J.W.'s home and returned to C.H.'s home with A.H.C.H. resumed his paternal relationship with A.H.S.S. agreed that while they lived together, C.H. provided for A.H. financially and emotionally. C.H. was good to A.H. and A.H. responded to C.H. as a child would to a parent. The three moved to North Carolina. However, C.H. soon left the home when he was assigned to military duty in Iraq. While he was away on duty, S.S. took A.H. back to Alabama without C.H.'s knowledge. C.H. believed S.S. and A.H. would await his return in North Carolina.
After S.S. returned to Alabama, her relationship with J.W. deteriorated. J.W. accused S.S. of, among other things, using illegal drugs, threatening him with violence, and becoming mentally unstable. S.S. accused J.W. of domestic violence, stalking, and criminal activity.
On November 7, 2005, the Russell County Department of Human Resources ("DHR") initiated a dependency action regarding A.H. DHR alleged that J.W. had been charged with domestic violence, committed in the presence of A.H., and that S.S. was using illegal drugs.
On November 8, 2005, the juvenile court heard DHR's petition. Based on an agreement of the parties, the court awarded temporary custody of A.H. to a maternal aunt. The court denied DHR's motion for a shelter-care order, but ordered DHR to provide protective supervision for A.H. The trial court was notified at the November 8 hearing that C.H. had filed an affidavit of fatherhood and had not relinquished his rights to A.H.
On January 13, 2006, J.W. filed a petition alleging that A.H. was dependent. J.W. alleged that he was the biological father of A.H., and he requested temporary custody of A.H.; he also requested that A.H.'s paternity be determined by the court. The juvenile court joined this petition with DHR's pending petition and set the matter for review on January 19, 2006.
On January 19, 2006, the juvenile court conducted a hearing on J.W.'s petition for a paternity determination without notifying C.H. At this hearing, J.W. and S.S. *117 acknowledged that J.W. was the biological father of A.H. and asserted that they had obtained genetic testing to establish J.W.'s paternity. As a result, the trial court adjudicated J.W. the father of A.H. and awarded him visitation with her. A.H. remained in the temporary custody of the maternal aunt. The juvenile court scheduled another hearing for March 9, 2006.
At the March 9, 2006, hearing, C.H. filed a motion to set aside the paternity determination. C.H. asserted that he was in active military service and was not able to attend the hearing. However, he asserted that he was the presumed father of A.H. by law, that he was named on the birth certificate as the father of A.H., and that he had raised A.H. as his daughter from her birth. C.H. also asserted that, until he had been deployed to Iraq on active military duty, A.H. and S.S. had lived in his home and he had claimed and cared for A.H. as his daughter. C.H. also asserted that he was a necessary party to the January 19, 2006, proceeding in which the juvenile court adjudicated J.W. to be the father of A.H. Thus, he argued, the paternity adjudication should be set aside. Alternatively, C.H. asserted that, if the juvenile court found A.H. to be dependent, custody of A.H. should be awarded to him. C.H. also requested any hearing on the matter be continued until his military commitments would allow him to attend.
The court denied C.H.'s motion for a continuance and proceeded with the March 9, 2006, hearing. At the conclusion of the hearing, the trial court awarded J.W. temporary custody of A.H. and awarded visitation to S.S. The juvenile court also noted that "because the Court has concerns about drug use [by] the mother and domestic violence issues with the father, this matter shall be reviewed on the 20th day of April, 2006."
On April 20, 2006, the juvenile court conducted a final hearing on the pending dependency and custody petitions. C.H. appeared with an attorney. C.H. again moved the court to set aside its paternity determination and to award him custody of A.H. on the same grounds as set out in his March 9, 2006, motion.
The trial court proceeded to take ore tenus evidence from J.W., S.S., C.H., and a DHR representative, Latanjulla Benjamin. Benjamin testified S.S. had tested positive for methamphetamines on one occasion, but negative on two other occasions. Although J.W. tested negative on all DHR drug screens, he admitted to testing positive for marijuana in another court proceeding. Benjamin expressed concern for the volatile interactions between S.S. and J.W., which, by the time of the hearing, had resulted in numerous criminal complaints being filed against both of them. Benjamin described an alarming verbal altercation between the two in the courthouse hallway that very day. She also indicated J.W. was acting unreasonably by "investigating" S.S. and anyone involved with her at night, leaving A.H. at home with his brother. J.W. also made wild and unfounded complaints against the maternal aunt who he had originally agreed should have temporary custody of A.H. DHR had recommended psychological testing for J.W. at the onset of the case, but he never underwent the testing because, as J.W. explained, he could not afford it at the time and, once he could, DHR never scheduled it.
J.W. testified that S.S. was not a fit mother due to her illegal drug use, "instability," and bad associates, some of whom had threatened him or attempted to assault him. He claimed to have seen drug paraphernalia at S.S.'s house, although he did not report it to the police. He told DHR S.S. was paying people for their *118 urine so she could pass her drug tests. He said S.S. had moved 29 times in the preceding 18 months and was now living with her new boyfriend in a bad environment.
In contrast, J.W. claimed he had financially supported A.H. from the time she was four months old. He testified he had lived in the same location for 20 years, that he was raising his 9-year-old daughter, and that he could financially provide for A.H. since he recently obtained a job paying $15.00 per hour. He said A.H. could stay in a nearby day care while he was working.
On cross-examination, J.W. admitted he had no documentation that he had provided any financial support for A.H. He also admitted that he took no action to claim paternity of A.H. until January 2006, after S.S. had instituted proceedings in an effort to obtain child support. He further affirmed he did not make any attempt to visit A.H. while she was living in Albany, explaining he had been threatened if he tried. He acknowledged S.S.'s aunt had filed a harassment charge against him, but claimed it had been "thrown out." He further denied he spit in S.S.'s face a few days prior to the hearing.
S.S. testified J.W. only provided her $120 in child support after she moved out of his house. S.S. said J.W. made numerous threatening telephone calls to her, one or more of which was played for the trial court, and that J.W. followed her on at least one occasion. S.S. said J.W. interfered with her right to visit A.H. and spit in her face and tried to hit her when she returned A.H. from their last visit. S.S. said J.W. had also threatened her with a screwdriver. S.S. denied slashing J.W.'s tires, but admitted her new boyfriend threatened J.W. with physical harm if he J.W. put his hands on S.S. again. S.S. admitted she did not pay J.W. any child support while he had custody of A.H., but she explained that she had withheld support due to J.W.'s interference with her visitation rights.
S.S. denied she was a drug user, claiming that she had not used methamphetamine since January 2006. She also denied that she had moved 29 times. She said that, at the time of the hearing, she was working as a secretary for her boyfriend, making approximately $320 per week.
Finally, C.H. testified that he should be awarded custody of A.H. He believed that he could properly care for A.H. because his girlfriend and her three children were living with him; according to C.H., his girlfriend stays at home to take care of her children and could also care for A.H.C.H. did not believe that it was appropriate for either J.W. or S.S. to have custody of A.H., based on the things he had heard.
At the conclusion of this hearing, the juvenile court issued an order stating:
"After hearing testimony presented and taking the matter under advisement, it is evident to this Court that the natural parents are incapable of putting the child's interests above their own.
"The Court finds that the parents would rather focus on their petty differences, to the detriment of the child, than focus on what is in the child's best interest.
"Frankly, the Court can think of no other way to provide for the best interest of this child than to declare the child dependent and place the child in the custody of [C.H.], the petitioner in .03.
"THEREFORE, IT IS HEREBY ORDERED, ADJUDGED AND DECREED:
"1. That custody is hereby granted to [C.H.].

*119 "2. That because of the constant domestic violence issues between [S.S.] and [J.W.], the Court will order visitation at the discretion of [C.H.] until such time as the parties can demonstrate to the Court that they have resolved those issues.
"3. That [S.S.] and [J.W.] shall pay child support in accordance with the Alabama Child Support Guidelines."
On May 25, 2006, J.W. appealed the juvenile court's judgment awarding C.H. custody of A.H. On June 2, 2006, C.H. cross-appealed the juvenile court's January 19, 2006, order, specifically noting that he "appeal[ed] from the denial of his motion to set aside the paternity determination." On June 13, 2006, this court ordered that enforcement of the juvenile court's judgment be stayed pending further orders.

Standard of Review
"In matters concerning child custody and dependency, the trial court's judgment is presumed correct on appeal and will not be reversed unless plainly and palpably wrong." Ex parte T.L.L., 597 So.2d 1363, 1364 (Ala.Civ.App.1992); see also Ex parte R.E.C., 899 So.2d 272, 279 (Ala.2004). Additionally, in Ex parte Anonymous, 803 So.2d 542 (Ala.2001), the Alabama Supreme Court stated:
"The ore tenus rule provides that a trial court's findings of fact based on oral testimony `have the effect of a jury's verdict,' and that `[a] judgment, grounded on such findings, is accorded, on appeal, a presumption of correctness which will not be disturbed unless plainly erroneous or manifestly unjust.' Noland Co. v. Southern Dev. Co., 445 So.2d 266, 268 (Ala.1984). `The ore tenus rule is grounded upon the principle that when the trial court hears oral testimony it has an opportunity to evaluate the demeanor and credibility of witnesses.' Hall v. Mazzone, 486 So.2d 408, 410 (Ala.1986)."
803 So.2d at 546.

Analysis
We first address C.H.'s appeal from the juvenile court's adjudication of paternity on January 19, 2006. C.H. asserts that he was a necessary party to that proceeding and that, because he was not joined in that proceeding, the paternity adjudication must be set aside.
The Alabama Uniform Parentage Act, § 26-17-1 et seq., Ala.Code 1975, addresses the parties who must be joined in an action to determine a father and child relationship. Section 26-17-11, Ala.Code 1975, provides, in pertinent part:
"The natural mother, each man presumed to be the father under the provisions of Section 26-17-5, and each man alleged to be the natural father, shall be made parties or, if not subject to the jurisdiction of the court, shall be given notice of the action in a manner prescribed by the court and an opportunity to be heard."
Thus, if C.H. meets the requirements of § 26-17-5, Ala.Code 1975, he is a "presumed father" and was a necessary party to J.W.'s petition to determine the paternity of A.H.
Section 26-17-5(a)(4), Ala.Code 1975, provides that "[a] man is presumed to be the natural father of a child if . . . [w]hile the child is under the age of majority, he receives the child into his home or otherwise openly holds out the child as his natural child." C.H. argues that he is A.H.'s "presumed father" because he has met the requirements of § 26-17-5(a)(4).
Based on our review of the record, we agree. Although C.H. and S.S. never married, C.H. lived with S.S. during her pregnancy, C.H. was present during A.H.'s *120 birth, and C.H. was named on the birth certificate as A.H.'s father. After her birth, A.H. lived with C.H. and C.H. acted as A.H.'s father from the time of A.H.'s birth until the child was four to five months old. At that time, S.S. returned to Alabama with A.H. and moved in with J.W. After several months with J.W., S.S. and A.H. returned to Georgia to live again with C.H., and then they moved with C.H. to North Carolina; at all times, C.H. treated A.H. as his own child.
For those reasons, we agree that C.H. has established that he received A.H. into his home or otherwise openly held her out as his natural child. Thus, C.H. is a presumed father under § 26-17-5.
We also note that all the parties to the proceeding in which J.W. was adjudicated to be the father of A.H. were aware of C.H.'s involvement with A.H. and that he claimed to be A.H.'s father. The juvenile court was also made aware of his existence and his claim. Although C.H. was out of the country at the time of that proceeding, had he been notified of J.W.'s petition for a paternity determination he would have been entitled to a deferment of that action until he returned from active military service, pursuant to the Soldiers' and Sailors' Civil Relief Act of 1940. 50 App. U.S.C. § 501 et seq.
Based on the foregoing, we conclude that C.H. was a necessary party to the paternity adjudication and that he was entitled to an opportunity to be heard on that issue before the juvenile court resolved that issue adversely to C.H. See Rule 19, Ala. R. Civ. P. (addressing the joinder of persons necessary for a just adjudication). We reverse the juvenile court's paternity adjudication of January 19, 2006, in which J.W. was adjudicated to be the father of A.H., and we remand the action to the juvenile court for further proceedings on that issue consistent with this opinion.
We next address J.W.'s appeal from the juvenile court's judgment awarding custody to C.H. As noted above, the juvenile court determined that A.H. was a "dependent child," pursuant to § 12-15-1(10), Ala.Code 1975, and, as a result, it awarded custody of A.H. to C.H. It is well settled that the primary concern in cases of alleged dependency is the best interests of the child. R.D. v. Baldwin County Dep't of Human Res., 608 So.2d 406 (Ala. Civ.App.1992).
"Although parents have a prima facie right to the custody of their child, this court has held that such right must always yield to the best interests of the child if it is shown that parental custody is contrary to those interests."
Brown v. Alabama Dep't of Pensions & Sec., 473 So.2d 533, 534 (Ala.Civ.App.1985).
Section 12-15-1, Ala.Code 1975, defines "dependent child" and provides numerous bases under which a court may determine a child to be dependent. Additionally, when determining the issue of dependency, a court may look at the totality of the circumstances. Martin v. State, 502 So.2d 769 (Ala.Civ.App.1987); Heup v. State Dep't of Human Res., 522 So.2d 295 (Ala.Civ.App.1988). Further, because the juvenile court received ore tenus evidence and observed the witnesses' demeanors, this court cannot reverse the juvenile court's judgment unless it is unsupported by the evidence so as to be clearly and palpably wrong. Everett v. Everett, 660 So.2d 599, 602 (Ala.Civ.App.1995).
In this case, the juvenile court could have relied on a number of those bases identified in § 12-15-1, Ala.Code 1975, in concluding that A.H. was dependent. The juvenile court heard ore tenus evidence indicating that S.S. and J.W. have repeatedly engaged in very physical domestic violence in front of A.H.S.S. and J.W. *121 have lodged numerous criminal charges against each other; S.S. and J.W. even engaged in an "alarming" argument in the courthouse hallway on the date of one of the hearings.
Additionally, a DHR representative testified that S.S. had tested positive for methamphetamine, an illegal substance. The juvenile court also heard testimony establishing that in September 2005 J.W. tested positive for marijuana use. Thus, the evidence indicates that both S.S. and J.W. have both used illegal drugs.
The testimony also indicated that S.S.'s living arrangements and employment appeared unstable; the evidence indicated that she had moved frequently and had no long-term place of residence. She also had no long-term work history and thus no steady stream of income.
Although J.W.'s living arrangements appeared stable and long-term, and DHR claimed that he refused to obtain a psychological examination as requested by DHR. Additionally, DHR expressed concern about J.W.'s behavior and questioned whether he was acting in an unreasonable manner by attempting to investigate S.S. and her friends on his own. In conducting his investigations, J.W. was leaving A.H. with his brother at night.
We cannot say that, considering this evidence and under the totality of the other evidence presented to the juvenile court, the juvenile court's determination of dependency was clearly and palpably wrong. Therefore, we affirm the dependency determination.
Once a court determines that a child is dependent, the court is authorized to make any one of a number of dispositions. Among other things, the trial court may "[p]ermit the child to remain with the parents, guardian, or other custodian of the child, subject to certain conditions and limitations as the court may prescribe"; "[t]ransfer legal custody to . . . [a] relative or other individual who, after study by the Department of Human Resources, is found to be qualified to receive and care for the child"; or "[m]ake any other order as the court in its discretion shall deem to be for the welfare and best interests of the child." § 12-15-71(a)(1), (3) c., and (4), Ala.Code 1975.
In this case, the juvenile court made its determination of dependency and placed A.H. with C.H. We find no error in this placement. C.H. requested custody of A.H. and asserted that he had a parent-child relationship with A.H.; S.S.'s testimony confirmed the existence of this parent-child relationship between C.H. and A.H. All the evidence presented to the juvenile court indicated that C.H. would be an appropriate placement for A.H.; in fact, S.S. indicated that C.H. had always been good to A.H. and had willingly supported her. In placing A.H. with C.H., the juvenile court acted well within its authority.
J.W. also argues on appeal that the juvenile court erred in granting custody to C.H., who, J.W. asserts, is a nonparent, over him, because, he asserts, he is A.H.'s biological father. J.W. argues that as between a natural parent and a nonparent, the natural parent has a presumptive right to custody of his or her child. J.W.'s brief fails to acknowledge that the juvenile court determined A.H. to be a "dependent child" and that, thus, the court was authorized to consider A.H.'s welfare and best interests in placing her, even if that required placement with a nonparent. See § 12-15-71, Ala.Code 1975. The juvenile court did not improperly consider a nonparent over a natural parent in awarding custody of A.H., and we find no error in the juvenile court's award of custody to C.H.


*122 Conclusion

We reverse the juvenile court's paternity adjudication of January 19, 2006, and we remand the action to the juvenile court for further proceedings consistent with this opinion. As to the juvenile court's determination of dependency and its award of custody to C.H., we affirm the juvenile court's judgment.
AFFIRMED IN PART; REVERSED IN PART; AND REMANDED.
THOMPSON, P.J., and PITTMAN, BRYAN, and THOMAS, JJ., concur.
