If any action or proceeding is commenced and maintained in any court to restrain the collection of any assessment levied for any municipal local improvement, to recover any such assessment previously paid, to recover the possession or title of any real property sold for such an assessment, to invalidate or cancel any deed or grant thereof for such an assessment, or to restrain or delay the payment of any such assessment, the true and just amount of the assessment due upon the property shall be ascertained and judgment shall be rendered for the assessment, making the assessment a lien upon the property and authorizing execution or process to issue for the collection of the assessment by a sale of the property. If in the opinion of the court the assessment has been rendered void or voidable by any act or omission, the court may order that a reassessment be made under the provisions of §§ 9-43-134 and 9-43-135. The court may require the payment of the assessment as a condition for granting such relief, or declare by its judgment that the assessment is a lien upon the property, and authorize the issuing of execution or proper process for its collection by a sale of the property, to the end that the whole matter may be adjudicated in the one action or proceeding and the proper proportion or ratio of the assessment be paid by the property owner. The cost of such an action or proceeding shall be taxed as the court may direct.
SDCL 9-43-126