No association or banking institution may make any loan or discount on the security of the shares of its own stock or of the stock of any holding company which controls the association or banking institution, nor be a purchaser or holder of any such shares, unless such security or purchase is necessary to prevent loss upon a debt previously contracted in good faith. Stock so acquired must be sold or disposed of at public or private sale within thirty days after it is acquired, and if not sold within such time, it must be canceled and deducted from the capital stock of the association, banking institution, or holding company, and the association, banking institution, or holding company shall notify the commissioner in writing of such cancellation. For the purpose of this section, "control" means ownership, or control directly, indirectly, or through the actions of one or more persons of the power to vote twenty-five percent or more of any class of voting securities of the association or banking institution, of the power to control in any manner the election of a majority of the directors of the association or banking institution, or to direct the management or policies of the association or banking institution.
N.D.C.C. § 6-03-33