Notwithstanding the provisions of §§ 26-1-1 and 26-7A-101, any child welfare agency, including the Department of Social Services, may continue to provide foster care for a person over the age of majority but less than twenty-one years of age if the person was in foster care immediately prior to reaching the age of majority and has not yet completed the twelfth grade of school or is in a continuing course of remedial treatment and if the person consents in writing to continued foster care.
SDCL 26-6-6.1