If the child or the child's parents, guardian, or other custodian requests an attorney in proceedings under this chapter or chapter 26-8A, 26-8B, or 26-8C and if the court finds the party to be without sufficient financial means to employ an attorney, the court shall appoint an attorney for the party. The court may appoint an attorney for any child or any party to the proceedings without request of the party if the court deems representation by an attorney necessary to protect the interests of the party. Reasonable and just compensation for services of a court-appointed attorney and for necessary expenses and costs incident to the proceedings shall be determined by the court within guidelines established by the presiding judge of the circuit court and shall be paid by the county in which the action is being conducted according to the manner prescribed by the court. If the court-appointed attorney is a party to a contract with the county to provide indigent counsel pursuant to subdivision 23A-40-7(3), the compensation for that attorney shall be that which the attorney would receive under the contract. This section does not preclude the court from appointment of an attorney for a child as required by provisions of chapter 26-8A.
SDCL 26-7A-31