N.C. Gen. Stat. § 1-359 provides:
After the issuing of an execution against property, all persons indebted to the judgment debtor, . . . may pay to the *134sheriff the amount of their debt, or as much thereof as is necessary to satisfy the execution; and the sheriffs receipt is a sufficient discharge for the amount paid.
It is undisputed that the plaintiff was a judgment debtor; that the defendant was a debtor of the plaintiff at the time the sheriff levied execution; and that the defendant paid the sheriff the amount of its debt to the judgment debtor.
Under N.C. Gen. Stat. § 1-359 a bank voluntarily can pay, if it chooses, to the sheriff the amount in a judgment debtor’s bank account when it is notified that there is an outstanding writ of execution against its depositor. Thus, N.C. Gen. Stat. § 1-359 provides the defendant with a complete defense to plaintiff’s action. See Parks v. Adams, 113 N.C. 473, 18 S.E. 665 (1893).
As the pleadings and affidavits before the trial court showed that there was no genuine issue as to any material fact and that the defendant was entitled to a judgment as a matter of law, the trial court correctly granted defendant’s motion for summary judgment. N.C. Gen. Stat. § 1A-1, Rule 56(c). The order of the trial court from which the plaintiff appealed is affirmed.
Affirmed.
Judges WHICHARD and BECTON concur.