Any person who has furnished labor or material used in the construction of any such public improvement as described in § 5-21-1, payment for which has not been made, shall have the right to intervene and be made a party to any action instituted by the public corporation on the surety, and to have his rights and claims adjudicated in such action and judgment rendered thereon, subject, however, to the priority of the claim and judgment of such public corporation. If the full amount of liability of the surety company is insufficient to pay the full amount of such claims and demands, then, after paying the full amount due the public corporation, the remainder shall be distributed pro rata among such interveners.
SDCL 5-21-5