
513 S.E.2d 901 (1999)
29 Va. App. 635
Kathy Jo DOTSON
v.
Jeffery S. HYLTON and Janice Hylton.
Record No. 1875-98-3.
Court of Appeals of Virginia, Salem.
May 4, 1999.
*902 Robert M. Galumbeck (Dudley, Galumbeck & Necessary, on brief), Tazewell, for appellant.
Robert B. Altizer (Gillespie, Hart, Altizer & Whitesell, on brief), Tazewell, for appellees.
Present: FITZPATRICK, C.J., and WILLIS and BUMGARDNER, JJ.
BUMGARDNER, Judge.
Kathy Jo Dotson appeals a decision that awarded visitation to the paternal grandmother of her daughter. She argues that the trial court erred in granting the visitation because she had sole custody and objected to it. Concluding that the trial court did not err, we affirm its decision.
Dotson maintains the trial court erred because it decreed visitation for the grandmother without finding that denying visitation was detrimental to the child. She further asserts that the trial court erred by merely substituting visitation with the grandmother for visitation with the father. Finally, she argues that if the trial court applied the correct standard, it abused its discretion and ruled contrary to the law because the evidence was not sufficient to support a finding that visitation was in the best interests of the child.
Dotson and Jeffery S. Hylton were divorced in November 1995 when their daughter was four years old. Upon decreeing divorce, the court also decreed joint legal custody with physical custody to the mother and granted reasonable visitation to the father. On March 5, 1998, the father was sentenced to ten years in the penitentiary. As soon as he was sentenced, the mother moved for sole custody. The father did not object to her obtaining full custody, but he requested reasonable visitation while he remained in the local jail as well as continued contact with his daughter through letters and telephone calls. He requested visitation for his mother. Dotson objected to visitation during his incarceration or by the grandmother. The trial court permitted the grandmother to intervene and petition for visitation.
*903 After an ore tenus hearing, the trial court granted the mother sole custody of the child. It specifically found that denial of visitation with the father and grandmother would not be in the best interests of the child. The trial court permitted the father visitation outside the jail and by letters and telephone calls after transfer to the penitentiary. It granted the grandmother visitation one Saturday per month, finding by clear and convincing evidence it was in the best interests of the child.
The mother argues that under Williams v. Williams, 256 Va. 19, 501 S.E.2d 417 (1998), the trial court cannot interfere with her constitutional right to raise her daughter unless the state has a compelling interest. A detriment to the child's welfare would constitute a compelling interest, but the state cannot intervene unless a detriment exists. Accordingly, she concludes that the trial court could award visitation to the grandmother only after finding that a detriment would arise if visitation was denied. Only after first finding that a detriment would arise, could the trial court determine whether the visitation was in the best interests of the child.
This case is not controlled by Williams, 256 Va. 19, 501 S.E.2d 417. In Williams, both parents objected to visitation by the grandparents, and the family was intact. Under those facts, .the Supreme Court held the state was required to have a compelling interest before interfering with parental rights. To grant visitation to the grandparents, over both parents' objection, the trial court had to find that withholding visitation would be detrimental to the child before it applied the best interests standard. The Court stressed that "[t]he child's family is intact." Id. at 20, 501 S.E.2d at 417. The factual predicate in Williams was a unified family.
When only one parent objects to a grandparent's visitation and the other parent requests it, the trial court is not required to follow the standard enumerated in Williams. In this case, the trial court had been determining custody and visitation based on the child's best interests since the divorce three years earlier. The factual foundation for the Williams decision did not exist. The family was not intact, and only one parent objected to visitation. The trial court properly distinguished the Williams case.
The mother and the father were before the court on a custody and visitation dispute, so the grandmother's petition to intervene was proper. Grandparents are parties with a "legitimate interest"[1] and may be awarded visitation as provided by Code § 20-124.2.[2] The parent-child relationship has primacy, but the trial court may award visitation to a grandparent upon a showing, by clear and convincing evidence, that the best interests of the child would be served. The statutory standard controls this case because Williams does not.
*904 The trial court heard the evidence ore tenus, and its decision "is entitled to great weight and will not be disturbed unless plainly wrong or without evidence to support it." Venable v. Venable, 2 Va.App. 178, 186, 342 S.E.2d 646, 651 (1986). The prevailing party in the trial court is entitled to have the evidence viewed in the light most favorable to it. See Farley v. Farley, 9 Va.App. 326, 328, 387 S.E.2d 794, 795 (1990).
When the couple was married, they lived with the grandmother, and the child spent substantial time with her. After the separation, the child continued to spend time with her grandmother during her father's visitation. The grandmother lived in a three-bedroom house with her adult son and daughter. The child was familiar with the father's extended family, and there was no evidence of abuse or that the grandmother's home was unfit. The mother admitted that the grandmother was mentally, physically and morally fit and able to care for the child. The father had visitation before he was jailed, and the court felt it should continue when he was not in the jail.
The trial court considered the statutory factors set forth in Code § 20-124.3 when deciding that visitation was in the child's best interests. The evidence was sufficient to prove by clear and convincing evidence that visitation by the grandmother was in the best interests of the child. The grandmother was a legitimate party in interest and properly before the court as an intervenor. Her visitation privileges were independent of the father's right to visit his daughter though they coincided with his wishes. See Code § 20-124.1.
Concluding that the trial court did not err, we affirm.
Affirmed.
NOTES
[1]  § 20-124.1. "Person with a legitimate interest" shall be broadly construed and includes, but is not limited to grandparents, stepparents, former stepparents, blood relatives and family members provided any such party has intervened in the suit or is otherwise properly before the court. The term shall be broadly construed to accommodate the best interest of the child. A party with a legitimate interest shall not include any person (i) whose parental rights have been terminated by court order, either voluntarily or involuntarily, or any other person whose interest in the child derives from or through such person whose parental rights have been so terminated, including but not limited to grandparents, stepparents, former stepparents, blood relatives and family members, if the child subsequently has been legally adopted except where a final order of adoption is entered pursuant to § 63.1-231 or (ii) who has been convicted of a violation of subsection A of § 18.2-61 or subsection B of § 18.2-366 when the child who is the subject of the petition was conceived as a result of such violation.
[2]  § 20-124.2. Court-ordered custody and visitation arrangements.... B. In determining custody, the court shall give primary consideration to the best interests of the child. The court shall assure minor children of frequent and continuing contact with both parents, when appropriate, and encourage parents to share in the responsibilities of rearing their children. As between the parents, there shall be no presumption or inference of law in favor of either. The court shall give due regard to the primacy of the parent-child relationship but may upon a showing by clear and convincing evidence that the best interest of the child would be served thereby award custody or visitation to any other person with a legitimate interest. The court may award joint custody or sole custody.
