If a sanitary district commences a condemnation action and files a declaration of taking and obtains an order of possession as provided in chapter 31-19, and later abandons the action when the property is no longer necessary for public purposes or the use of which the property was originally sought to be condemned no longer exists, the board of trustees of a sanitary district, upon order of the circuit court in which the condemnation action is pending, shall convey the property to the original owner and the original owner shall return the deposit on file with the clerk of courts. This section applies to any condemnation action abandoned by a sanitary district, organized under this chapter, prior to the effective date of this section.
SDCL 34A-5-32