The lease shall provide that the lessee may, at the expiration of the original or any extended term, purchase the leased premises at a stated price, which shall be the balance of the total cost of the project financed not amortized by the payments of rents previously made by the lessee. The lease shall provide that in the event of the exercise of the option to purchase the leased premises or in the event the lease has been extended for the full number of years which it is agreed the same may be extended, and all rents and payments provided for in the lease have been made, the lessor shall convey the premises to the lessee.
SDCL 49-16B-17