This title may not be construed as authorizing any state or county official, agent, or representative, in carrying out any of the provisions of this title, to take charge of any child over the objection of either of the parents of the child or the person standing in loco parentis to the child, except pursuant to a proper court order. When it is necessary to take charge of a child pursuant to a court order, the department shall, when it is in the best interests of the child and when the home is approved by the department, place the child with the child's extended family, including adult siblings, grandparents, great-grandparents, aunts, and uncles, prior to placing the child in an alternative protective or residential facility.
§ 52-2-102, MCA