If no court order for custody has been granted and the parents are unmarried who has the custody of a child in Minnesota?

An unmarried mother has custody of her child until the father has established his paternity in court and requested joint custody.