This court’s opinion, filed March 24, 1992, is withdrawn on the court’s own motion and the following opinion is substituted in its place.
Amaya appeals from the district court’s decision discharging the writ of garnishment she had served upon Rio Grande Credit Union (RGCU). We conclude that the district court erred in entering judgment for RGCU, and we reverse and remand.
In January 1990, Amaya secured a compensation order in her workers’ compensation claim against her employer, Leonard Santistevan. When he failed to pay, she applied for a supplementary compensation order from the Workers’ Compensation Division and then petitioned the district court *142to enter judgment on that order. See NMSA 1978, § 52-5-10 (Repl.Pamp.1991) (effective until January 1, 1991). The court entered a default judgment against Santistevan in May 1990.
After other enforcement efforts failed, in October 1990, Amaya applied to the district court for several writs of garnishment, including one she served on RGCU. See NMSA 1978, §§ 35-12-1 to -19 (Repl.Supp.1988). RGCU answered that it “[has] in [its] possession the sum of $3374.22 in a Share Account (savings account). This sum is being held as security for the repayment of loans made to Leonard Santistevan by the Garnishee and is subject to said prior lien.” The garnishee’s attorney signed the answer. No one signed for the garnishee, although a space was provided for “an officer, partner, or authorized representative of the named Garnishee” to:
[Vjerify that he has read the above and foregoing Answer by Garnishee, that he knows the contents thereof, and that the same are true to the best of his knowledge and belief; that he is the custodian of the records upon which such Answer is based, and that said Answer is true and correct based upon said records.
Amaya filed a “controversion” of the garnishee’s answer, see § 35-12-5(A), in which she argued that “no valid security interest can be obtained, claimed, or held in cash money of a savings account.” She also requested a hearing.
A hearing was held before the district court, at which both parties relied on Article 9 of the Uniform Commercial Code. Amaya argued that the legislature had excluded this account from Article 9. See NMSA 1978, § 55-9-104(1) (Repl.Pamp.1987) (excluding from Article 9 a transfer of any interest in any deposit account, except as provided with respect to proceeds and priorities in proceeds); see also NMSA 1978, § 55-9-105(l)(e) (Repl.Pamp.1987) (defining “deposit account”). RGCU contended that it had “advanced money to Mr. Santistevan in two different loans. Each of the loans provided that some security was offered.” RGCU also contended that it had possession of the funds in the share account, and that consequently it had a perfected security interest pursuant to NMSA 1978, Section 55-9-305 (Repl.Pamp.1987) (“A security interest in ... money ... may be perfected by the secured party’s taking possession of the collateral.”). Amaya argued that RGCU was not in possession because Santistevan had drawn the account down below the required minimum.
The district court concluded that Section 55-9-305 controlled and RGCU had a security interest in Santisteven’s share account with priority over Amaya’s writ of garnishment. The district court therefore rejected Amaya’s controversion of the garnishee’s answer and discharged the writ.
The record indicates that RGCU possessed some documents that were relevant, which the district court may have reviewed and of which Amaya was aware, but those documents are not part of the record. The record indicates that the parties relied in argument on documents other than the pleadings, and neither party suggested to the district court judge that there were disputed issues of material fact. Cf. Transamerica Ins. Co. v. Sydow, 97 N.M. 51, 54, 636 P.2d 322, 325 (Ct.App.1981) (where matters outside the pleadings are considered, a motion to dismiss will be treated as a motion for summary judgment). The record supports a conclusion that the district court in effect either granted RGCU judgment on the pleadings or summary judgment.
We first discuss the nature of garnishment and then analyze the respective claims of the parties on appeal. We conclude that the district court erred in granting judgment to RGCU, which had not established that it was entitled to judgment as a matter of law, and that the cause should be remanded for trial.
NATURE OF GARNISHMENT.
Garnishment proceedings provide a remedy, in the form of attachment, which is controlled by statute. Behles v. Ellermeyer (In re Lucas), 107 B.R. 332, 334 (Bankr.D.N.M.1989); Jemko, Inc. v. Liaghat, 106 N.M. 50, 52, 738 P.2d 922, 924 *143(Ct.App.1987). In pursuing this remedy, the plaintiff seeks subrogation “to defendant’s rights against the garnishee.” Id. at 54, 738 P.2d at 926. The primary issue in a garnishment proceeding is whether the garnishee owes a debt to the debtor or holds property in its possession that belongs to the debtor. Putman & Putman, Inc. v. Capitol Warehouse, Inc., 115 S.W.2d 460, 463 (Tex.Ct.App.1989).
Under New Mexico statutes, a writ may issue “only upon the filing of a civil complaint together with a certified copy of the judgment and an affidavit of the plaintiff that the defendant has no property in his possession within this state subject to execution to satisfy the judgment,” § 35-12-1(C), and that the plaintiff believes the garnishee “is indebted to the defendant and that the debt is not exempt from garnishment[,] or ... holds personal property belonging to the defendant.” § 35-12-l(D).
Service of the writ “has the effect of attaching all personal property, money, wages or salary in excess of the amount exempt under Section 35-12-7 NMSA 1978, rights, credits, bonds, bills, notes, drafts and other choses in action of the defendant in the garnishee’s possession or under his control,” § 35-12-3(A), and it confers upon the garnishor “a priority status senior to any other writ which is served at a later date.” Behles v. Ellermeyer (In re Lucas), 107 B.R. at 335 (citing §§ 35-12-3, - 9). Subsequent pleadings control the garnishor’s right to entry of judgment against the garnishee, and the method by which the issues are resolved. See § 35-12-5(A) (which provides that “[i]f the plaintiff or defendant is not satisfied with the answer of any garnishee, he may controvert it by stating how he believes it is incorrect, and the issue shall be tried and determined by the magistrate court”); see also Putman & Putman, Inc. v. Capitol Warehouse, Inc., 775 S.W.2d at 463 (discussing the effect of the garnishee’s answer on the garnishor’s burden of proof).
If, for example, the garnishee:
[Ajnswers under oath that he is not at the time of answer, and was not, at the time the garnishment was served on him, indebted to the defendant or in possession of any personal property of the defendant, and if the garnishee’s answer is not controverted within twenty days after being made, the magistrate shall enter judgment discharging the garnishee.
§ 35-12-4(A). However, if “the garnishee answers simply that it does hold funds which belong to the debtor [, the] answer ... establishes prima facie that the debtor owns the funds____” Putman & Putman, Inc. v. Capitol Warehouse, Inc., 775 S.W.2d at 463 (emphasis in original). Under these circumstances, the court may enter judgment for the garnishor against the garnishee without a trial. See § 35-12-4(C).
If the garnishee’s answer “raises doubt about who actually owns funds admittedly held by the garnishee for another,” the issues must be tried. See Putman & Putman, Inc. v. Capitol Warehouse, Inc., 775 S.W.2d at 463. The garnishor must establish the debtor’s right to the fund, id., but if the garnishee raises an affirmative defense in its answer, which the garnishor controverts, the garnishee has the burden of proving that defense. See generally 6 Am.Jur.2d Attachment and Garnishment § 383, at 828-29 (1963) (discussing the rules of evidence in the trial of garnishment issues).
THE RIGHTS OF THE PARTIES.
After Amaya filed her controversion, she was entitled to a trial of any issues raised by the pleadings. A garnishee’s answer may only be construed as one would construe a pleading; on disputed issues, a garnishee’s answers are not evidence. See Zanz v. Stover, 2 N.M. (Gild.) 29 (1880). We think the issue raised by the pleadings was a matter of affirmative defense. RGCU answered that it had a sum in a savings account, but' it claimed that amount as security for loans it had extended. RGCU thus admitted that Santistevan had deposited the sum it held in the share account, but claimed a right in the account that was superior to the right created by service of the writ. However, this answer was not verified and cannot be viewed as *144evidence. Cf. Archuleta v. Goldman, 107 N.M. 547, 761 P.2d 425 (Ct.App.1987) (unsworn statements of counsel in pleadings not evidence on summary judgment motions).
The proof required of a garnishee bank depends in part on the nature of the right it asserts. Cf. Peoples Nat’l Bank v. United States, 777 F.2d 459 (9th Cir.1985) (when garnishee extends credit subject to an agreement that garnishee could charge the indebtedness to defendant’s account, a pledge of a deposit account is effective only upon the transfer from the pledgor to the pledgee of an indispensable instrument such as a passbook) with Heffernan v. Wollaston Credit Union, 30 Mass.App.Ct. 171, 567 N.E.2d 933 (1991) (recognizing bank’s superior equitable interest in credit union account in bank in action by codepositor, when bank had placed a computer “hold” on the account pursuant to written agreement with the two depositors). It also depends on state law.
Case law as well as scholarly commentary supports the conclusion that Article 9 does not govern the question of whether RGCU had an interest that prevails over the lien Amaya acquired by serving the writ of garnishment. See Duncan Box & Lumber Co. v. Applied Energies, Inc., 165 W.Va. 473, 270 S.E.2d 140, 143 (1980); Gillman v. Chase Manhattan Bank, 73 N.Y.2d 1, 537 N.Y.S.2d 787, 794 n. 1, 534 N.E.2d 824, 831 n. 1 (1988); see also 8 William D. Hawkland et al., Uniform Commercial Code Series § 9-104:13 (1990); 1 Peter F. Coogan et al., Bender’s Uniform Commercial Code Service, Secured Transactions Under the Uniform Commercial Code § 3.14 (1991). Under Article 9, the legislature has excluded both rights of set-off and deposit accounts. See §§ 55-9-104(i), (l). In excluding these rights, the legislature has left in place several principles as a result of which RGCU may have an interest that prevails over the lien Amaya acquired by serving the writ.
For example, a bank has the well-established common-law right to set off funds on general deposit against a debt owed by a depositor to the bank. See Frierson v. United Farm Agency, Inc., 868 F.2d 302 (8th Cir.1989); Martens v. Hadley Memorial Hosp., 729 F.Supp. 1391, 1396 (D.D.C.1990); Tri State Bank v. Colby, 141 Ill.App.3d 807, 96 Ill.Dec. 1, 490 N.E.2d 1037 (1986). A bank may have rights created by written agreement, see Duncan Box & Lumber Co. v. Applied Energies, Inc., or by common law pledge. See generally Dwight L. Greene, Deposit Accounts as Bank Loan Collateral: Beyond Setoff to Perfection—The Common Law Is Alive and Well, 39 Drake L.Rev. 259 (1989-90). Such interests may give a bank a right in a depositor’s account that prevails over a subsequent attachment of that account. See Duncan Box & Lumber Co. v. Applied Energies, Inc., (common-law pledge created by written agreement); Frierson v. United Farm Agency, Inc. (common-law right of set-off and written agreement); Martens v. Hadley Memorial Hosp. (bank’s common-law right of set-off against demand deposits); Tri State Bank v. Colby (same, but noting common-law right only applies to matured debts; absent express authority, bank cannot apply funds on deposit to an unmatured indebtedness).
When a bank has asserted a right of set-off to protect a matured debt created by written agreement, under the law of some states, the bank’s interest will prevail over that of a judgment creditor, even if the bank has not yet exercised its right of set-off. See Jersey State Bank v. United States, 926 F.2d 621 (7th Cir.1991) (applying Illinois law); Jefferson Bank & Trust v. United States, 684 F.Supp. 1542 (D.Colo.1988), aff'd, 894 F.2d 1241 (10th Cir.1990) (applying Colorado law); see also Frierson v. United Farm Agency, Inc. (bank need only show that loan is in default; time of default identified by language of written agreement between bank and depositor); Martens v. Hadley Memorial Hosp. (same). In other states, a bank must either establish a common law pledge or make a showing that the bank or credit union has exercised its right of set-off. United States v. Bell Credit Union, 860 F.2d 365 (10th Cir.1988) (applying Kansas law).
*145Because the record indicates that RGCU failed to offer into the record any evidence of its interest in Santisteven’s account that would give it priority over Amaya’s right, we must remand for trial, see Zanz v. Stover, unless, as RGCU has argued, we may affirm the judgment entered in its favor as right for the wrong reason, see SCRA 1986, 12-201(C) (“Review without cross-appeal”); see also Williams v. Williams, 109 N.M. 92, 95, 781 P.2d 1170, 1173 (Ct.App.1989), or unless Amaya is entitled to an order from this court directing that the district court enter judgment in her favor. We think the matter must be remanded for trial, at which time RGCU will have the burden of proving facts to support its claim to an interest that is superior to Amaya’s.
On appeal, RGCU has not relied on the Code or common law principles. Rather, RGCU has relied on NMSA 1978, Section 58-11-46 (Repl.Pamp.1991) of the Credit Union Regulatory Act, NMSA 1978, §§ 58-11-1 to -65 (Repl.Pamp.1991), which is modeled on the Federal Credit Union Act, 12 U.S.C. Sections 1751 to 1795k (1988); see N.M. AG Op. No. 82-3 (1982).
Section 58-11-46 creates a lien on share accounts for any sum owed to a credit union. It also creates the credit union’s right to an immediate set-off in each share account. Id. The statute reads:
A credit union shall have a lien on the membership shares, share accounts and deposit accounts and accumulated dividends and interest of a member in his individual, joint or trust account for any sum owed the credit union from that member or for any loan endorsed or guaranteed by him. A credit union may refuse to allow withdrawals and shall have a right of immediate set-off with respect to every such account. The credit committee, credit manager or loan officer may waive the credit union’s rights to a lien, to immediate set-off, to restrict withdrawals or to any combination of those rights with respect to any share or deposit account or groups of those accounts.
However, without any evidence showing that the garnishee is a credit union as defined under Section 58-ll-2(C), or that the credit union extended credit to Santistevan, we are not in a position to affirm the trial court under Section 58-11-46. Further, because the nature of the interest on which the bank relies does not appear in the record, we are reluctant to construe Section 58-11-46 definitively at this time.
We note that the statute does not expressly change common-law rules. At common law, a bank’s right of set-off was often described as a “banker’s lien.” That term is something of a misnomer, because the right of set-off existed at common law only after a debt was in default or had matured. See Tri State Bank v. Colby; see also Ray A. Brown, The Law of Personal Property § 13.12, at 443 (3d ed. 1975). Absent express authority, under common law a bank could not apply funds on deposit to an unmatured indebtedness. Id. We assume but need not decide that Section 58-11-46 at least codifies the common law rules governing pledges and the right of set-off. Cf. National Temple Non-Profit Corp. v. National Temple Community Fed. Credit Union, 603 F.Supp. 807, 809 (E.D.Pa.1985) (nothing in Federal Credit Union Act indicates Congress was concerned with “mechanics of establishing a legally enforceable lien nor how to foreclose upon it”). Nevertheless, as the cases cited above reveal, the terms of the written agreement between the bank and its depositor are relevant and may be dispositive. Under these circumstances, we remand for further proceedings. On this record, we cannot hold that Section 58-11-46 allows us to affirm the district court as right for the wrong reason.
We do not think Amaya is entitled to an order from this court directing the district court to enter judgment in her favor. At the time of the hearing, neither party suggested to the district court that there was any genuine issue of material fact.
In summary, we conclude that the pleadings raised a triable issue of fact. Although the hearing in district court result*146ed m judgment for RGCU, during that hearing RGCU failed to show that it was entitled to judgment as a matter of law. Therefore, we reverse the decision of the trial court and remand for a trial on the merits. Amaya shall recover her costs on appeal. See SCRA 1986, 12-403(B)(2).
IT IS SO ORDERED.
APODACA and BLACK, JJ., concur.