Danielle S., natural mother of S.D.S., bom on March 5,1997, appeals the trial court’s order awarding Kenny and Colleen Paillet, S.D.S.’s paternal grandparents, visitation rights to S.D.S. On appeal, Danielle argues that the trial court’s findings that grandparent visitation would be in the best interests of S.D.S. and that the Paillets had established a substantial relationship with S.D.S. are not supported by substantial competent evidence.
On July 29, 1997, the Department of Social and Rehabilitation Services (SRS) filed a petition on behalf of Danielle for declaration of paternity and an order of support for S.D.S. On August 14,1997, the trial court entered a journal entry finding that Joshua J. Paillet was the natural father of S.D.S. and ordered him to pay child support.
Joshua was killed in a motor vehicle accident on July 25, 1998. On October 7, 1998, Joshua’s parents, Kenny and Colleen Paillet, filed for visitation pursuant to K.S.A. 38-129 et seq. The Paillets’ petition was filed under the same caption as the original paternity suit, with Joshua named as the respondent, although he was deceased. We view the Paillets’ petition as a petition to intervene.
The trial court found that visitation by the Paillets would be in the child’s best interests and that a substantial relationship between S.D.S. and the Paillets had been established. Danielle timely appeals the trial court’s order.
On appeal, Danielle argues that the trial court erred in awarding the Paillets visitation rights to S.D.S. Specifically, Danielle contends that the trial court’s findings are not supported by substantial competent evidence.
When sufficiency of evidence is challenged on appeal, it is the appellate court’s duty to review the evidence in the light most favorable to the party prevailing below to determine whether substantial competent evidence exists to support the findings. In re Adoption of F.A.R, 242 Kan. 231, 238-39, 747 P.2d 145 (1987). Substantial evidence is evidence which possesses both relevance and substance and winch furnishes a substantial basis of fact from which the issues can reasonably be resolved. Stated another way, *297substantial evidence is such legal and relevant evidence as a reasonable person might accept as being sufficient to support a conclusion. In re Estate of Reynolds, 266 Kan. 449, 461, 970 P.2d 537 (1998).
K.S.A. 38-129 allows a trial court to award grandparent visitation:
“(a) The district court may grant the grandparents of an unmarried minor child reasonable visitation rights to the child during the child’s minority upon a finding that the visitation rights would be in the child’s best interests and when a substantial relationship between the child and tire grandparent has been established.
“(b) The district court may grant the parents of a deceased person visitation rights, or may enforce visitation rights previously granted, pursuant to this section, even if the surviving parent has remarried and the surviving parent’s spouse has adopted the child. Visitation rights may be granted pursuant to this subsection without regard to whether the adoption of die child occurred before or after the effective date of this act.”
It is clear from the statute that when a parent is deceased, grandparent visitation may be ordered upon a finding that visitation is in the child’s best interests and when a substantial relationship between the child and the grandparents has been established. The trial court must make these findings before grandparent visitation is granted. Santaniello v. Santaniello, 18 Kan. App. 2d 112, 114, 850 P.2d 269 (1992).
In making its ruling from the bench, the trial court stated that S.D.S. should have a relationship with both sides of her family. The trial court noted in the journal entry that “visitation by the paternal grandparents would be in the child’s best interest and that a substantial relationship between the child and paternal grandparents has been established.”
A similar presumption was made by the trial court in Santaniello. This court held in Santaniello that a trial court “may not presume that grandparent visitation is in a child’s best interests or that a substantial grandparent-grandchild relationship exists. The burden of proof is upon the grandparents to show such visitation is in the child’s best interests.” 18 Kan. App. 2d 112, Syl. ¶ 2.
Danielle testified that S.D.S. should have a relationship with the Paillets; however, the record on appeal does not reflect that the Paillets had a substantial relationship with S.D.S. The record on *298appeal reflects that at the time of the hearing, S.D.S. was approximately 22 months old. Before Joshua died, Danielle’s mother told him that “if he showed up on the place she would call the police on him.” Before he died, Joshua was negotiating with Danielle for visitation with S.D.S.
The evidence at the hearing showed that there was a strained relationship between Danielle and the Paillets. Danielle repeatedly stated during the hearing that a relationship between S.D.S. and the Paillets should be fostered and encouraged. Notwithstanding this testimony, Danielle admitted that she had previously authorized her attorney to tell the Paillets she would not let them visit S.D.S. at anytime.
The testimony óf the surviving parent, Danielle, shows that she prevented the grandparents, who are parents of the child’s deceased parent, from having any relationship with their grandchild. Danielle made it impossible for the grandparents to meet the statutory requirement of an existing substantial relationship. Although this is not a contract case, the facts make it analogous to a contract where one party has made it impossible for the other to perform. See Talbott v. Nibert, 167 Kan. 138, 146, 206 P.2d 131 (1949). Where Danielle has prevented the grandparents from even seeing their grandchild, there is no way they could have formed the substantial relationship required by statute. Under these circumstances, Danielle is coming to this court with unclean hands and should not be allowed to hide behind the wording of the statute. See Perrenoud v. Perrenoud, 206 Kan. 559, 577-78, 480 P.2d 749 (1971).
A case from Iowa with similar facts, In re Hough, 590 N.W. 2d 556, 559 (Iowa App. 1999), held:
“We hold where the grandparents of a child seek visitation with their grandchild and tire parent continually and unreasonably denies visitation . . . a grandparent cannot be denied visitation for failure to have established a substantial relationship .... Under such circumstances, a parent preventing grandparents from having meaningful contact with the child is estopped from claiming the grandparents do not have any rights because of no substantial relationship.”
We hold that where a parent is deceased and the other parent denies their child visitation with the parent or parents of the de*299ceased parent, absent some compelling reason to the contrary, the statutory requirement of an existing substantial relationship between the grandparent and the child shall not be required before granting visitation rights to the grandparent.
Affirmed.