Biological parents are entitled to custody of their children unless it clearly appears they are unfit, have abandoned their right to custody, or there are some extraordinary circumstances that would require they be deprived of custody.  If any of the above are true, the Court may apply a best-interest-of-the child test when awarding custody to a third party.
The Minnesota Supreme Court has held there is a presumption in custody cases that the natural parent is fit to raise his or her own child, and that the burden of disproving the presumption rest with those who challenge it.  There must be “grave and weighty” reasons to separate a child from their natural parent.  Third party custody claims are very rare and are often unsuccessful.