This is an appeal by a bankruptcy trustee from a Bankruptcy Appellate Panel decision affirming a decision of the Bankruptcy Court that permitted a creditor bank to exercise a right of setoff under 11 U.S.C. § 553 (1994) against an account maintained by the debtor in the creditor bank. The right of the debtor to withdraw from the account was partially restricted, but the account was in most other respects a general account maintained by the debtor in the course of its business dealings. We affirm the decision of the Bánkruptcy Appellate Panel.
FACTS1
On March 29, 1996, the debtor, along with three related corporate entities, filed voluntary Chapter 11 petitions. Prior to the filing, the debtor was engaged in the business of originating, purchasing, and selling commercial leases of copy machines and other office equipment. In order to obtain finane-*138ing for its operations, the debtor compiled and sold to banks and other investors “packages” of leases in which it was the lessor. As part of these financing transactions with banks, the debtor prepared, executed, and presented a Payment Account Agreement (“Agreement”), which governed the establishment of a Payment Account (“Account”), which provided a convenient mechanism for the repayment of the monthly principal and interest that would become due to the banks. By the Agreement, the debtor granted the banks a security interest in the monies on deposit in the Account equivalent to one month’s advance payment due on all of the leases sold to that bank (the “Collateral”). The banks would then automatically deduct this payment from the Account each month when it became due.
The Agreement mechanism was used by the debtor in its financing transactions with approximately 250 banks, and $8,000,000.00 or more was on deposit in various accounts at the time the debtor filed its bankruptcy petition. The bankruptcy petition was the result of what has been called by the United States Securities and Exchange Commission the largest “Ponzi” scheme in United States history. Here, the appellee bank had entered into a total of six lease-purchase financing transactions with the debtor, but only two— those entered into on October 25, 1991, and January 31, 1992 — remained unpaid at the time of the filing of the bankruptcy petition. There is no evidence that the bank was aware of the fraudulent scheme.
As the Agreement is the focal point of this appeal, it is helpful to review some of its key provisions. Paragraph 6 of the Agreement provided that the amounts deposited by the debtor into the Account were to be invested by the bank, and interest “at the standard rate for such deposits” was to be credited to the debtor, that was required to report and pay any income taxes which became due. Paragraph 7 of the Agreement authorized the debtor to withdraw from the Account any interest or other amounts in excess of the Collateral once every three months, and provided that once all the obligations required under the financing documents were performed, the debtor was entitled to withdraw any remaining Collateral, including any accrued interest, from the Account. Paragraph 8 of the Agreement provided that until such time as all of the obligations required under the financing documents were performed, the debtor was prohibited from assigning, withdrawing, or selling any of its interests in the Collateral on deposit in the Account.
As of the petition date, the balance in the Account was $53,691.75. On the October 25, 1991, lease package, the monthly payment due was $2,061.72, and the balance on the note to the bank was $13,920.31. On the January 31, 1992, lease package, the monthly payment due was $657.66, and the balance due on the note was $9,989.25.
When the debtor’s petition was filed, the bank placed a “Strumpf-style" administrative hold on the account. See Citizens Bank v. Strumpf, 516 U.S. 16, 17, 116 S.Ct. 286, 133 L.Ed.2d 258 (1995). On April 22, 1996, the bank filed its Motion to Vacate the Automatic Stay to allow it to exercise its alleged right of setoff against the Account. After the bankruptcy court allowed the setoff against those funds that exceeded the amount of the Collateral, the bank retained $23,909.56, the amount due on the two unpaid promissory notes, and it remitted $29,782.19, the excess in the Account, to the trustee.
STANDARD OF REVIEW
The bankruptcy court’s findings of fact are reviewed for clear error. Shugrue v. Air Line Pilots Ass’n, Int’l (In re Ionosphere Clubs, Inc.), 922 F.2d 984, 988 (2d Cir.1990). Conclusions of law are reviewed de novo. Id. The decision to lift the automatic stay to allow exercise of setoff rights is reviewed for abuse of discretion. Bohack Corp. v. Borden, Inc., 599 F.2d 1160, 1165 (2d Cir.1979).
DISCUSSION
Section 553(a) of Title 11 of the United States Code does not create a right of setoff,2 but rather preserves whatever right *139exists under applicable non-bankruptcy law. There is no dispute that New York law is the applicable non-bankruptcy law. There is also no question that New York has long recognized a common law right of setoff. See Straus v. Tradesmen’s Nat’l Bank, 122 N.Y. 379, 25 N.E. 372, 372 (1890). New York also has codified the right to setoff. N.Y. Debt. & Cred. Law § 151 (McKinney 1997).
This Circuit in Bohack, 599 F.2d at 1164-65, made clear the favored position of setoff and that that position extends to bankruptcy. While the prior Bankruptcy Act was at issue in Bohack, 599 F.2d at 1162-63 U.S.C. § 553 is fully in accord with the prior Second Circuit jurisprudence. Cases under the prior Bankruptcy Act required “compelling circumstances” to disregard state sanctioned setoff rights. Bohack, 599 F.2d at 1165. As Judge Friendly stated in Baker v. Troiano (Matter of Lehigh and Hudson River Ry. Co.), 468 F.2d 430, 434 (2d Cir.1972), injunction against a setoff is “strong medicine.”
In accordance with case law under the prior Bankruptcy Act, 11 U.S.C. § 553(a) allows setoff of “mutual” debts that “arose before the commencement of the ease.” There is no dispute that the Account deposits and the loan from the bank arose before the “commencement of the case,” i.e., the filing of the bankruptcy petition. The disagreement is whether a mutual debt existed, that is, whether the creditor and the bankrupt debt- or each incurred a debt to the other in the same right or capacity. See Modern Settings, Inc. v. Prudential-Bache Sec., Inc., 936 F.2d 640, 648 (2d Cir.1991).
Ordinarily, funds in a general deposit account can be used to setoff debts owed to the bank because when a depositor deposits funds into a general account he parts with title to the funds in exchange for a debt owed to him by the bank, thereby establishing a standard debtor-creditor relationship. See First Nat’l City Bank v. Herpel (In the Matter of Multiponics, Inc.), 622 F.2d 725, 728 (5th Cir.1980); Miller v. Wells Fargo Bank Int’l Corp., 540 F.2d 548, 560-61 (2d Cir.1976).
The trustee relies principally on Katz v. First Nat’l Bank of Glen Head, 568 F.2d 964, 969-70 (2d Cir.1977), for the proposition that mutuality does not exist if there is any restriction on the right of withdrawal from the deposit account. Glen Head, however, is not directly on point. It focused, not on the right of setoff, but on prior preference law. Id. at 969. Furthermore, although Glen Head stated that whether or not funds were withdrawable at will was an important factor to consider, at issue in the case was the sudden and unusual buildup of funds in an account within the 90 days preceding bankruptcy under circumstances indicating that the debtor intended to give the bank a preferential setoff. Similarly, in Mechanics’ & Metals Nat’l Bank v. Ernst, 231 U.S. 60, 67, 34 S.Ct. 22, 58 L.Ed. 121 (1913), cited by appellant, a deposit made after the bank had frozen the account and refused to honor any more checks was found to be a voidable preference rather than a valid setoff. Ernst involved a complete withdrawal restriction, not a limited restriction of the sort at issue here, and was coupled with an improper intent to favor the offsetting creditor. Id. at 66-67, 34 S.Ct. 22.
We find that the proper test of mutuality with respect to bank accounts is not a bright line test based on the existence of any withdrawal restrictions, but rather an examination of the total circumstances of the establishment and maintenance of the account. This is the approach taken by both the Eighth Circuit in First Nat’l Bank of Clinton v. Julian, 383 F.2d 329, 336-39 (8th Cir.1967), and the Fifth Circuit in Herpel, 622 F.2d at 728-29, with respect to accounts with withdrawability restrictions. In Herpel, the court recognized that a presumption of a debtor-creditor relationship arises when funds are on deposit at a bank, but held that the presumption had been rebutted by a showing that the account at issue had been established solely to secure payment to the *140bank, the depositor was prohibited from making withdrawals without the bank’s permission, and the funds in the account were at all times segregated from the bank’s other funds. Id. at 728-29.
By contrast, in Julian, 383 F.2d at 332, the bankrupt, an automobile dealership, had various financial arrangements with the bank; the “reserve account” at issue had been established to provide additional security for the bank, not as the main collateral; and withdrawal permission was required. The account, however, was not segregated from general bank funds, id. at 337, and setoff was permitted, id. at 339. The case at hand is even more favorable for setoff than Julian. As in Julian, there was no requirement of fund segregation, and here withdrawal without bank permission was permitted, although only on a periodic basis and only for deposits above the amount necessary for one month’s rent payment.
New York law appears to address the issue of mutuality in a similar way, focusing on all of the circumstances and whether the intent of the parties was to create a “special” or trust account as opposed to a general account subject to setoff, with the presumption that accounts are general. See Gray v. First Nat’l Bank & Trust Co., 263 N.Y. 479, 189 N.E. 557, 559-60 (1934) (evidence of intent required to show special account); Noah’s Ark Auto Accessories, Inc. v. First Nat’l Bank, 64 Misc.2d 944, 316 N.Y.S.2d 663, 665 (N.Y.Sup.Ct.1970) (rebuttable presumption account is general), aff'd 37 A.D.2d 692, 323 N.Y.S.2d 408 (N.Y.App.Div.1971). Furthermore, the party claiming special-fund status has the burden of showing an intent to have the funds “kept separate from the general funds of the bank.” Id.; accord Peoples Westchester Sav. Bank v. FDIC, 961 F.2d 327, 330-31 (2d Cir.1992) (special deposit requires explicit proof); City of Los Angeles v. Irving Trust Co. (In re Kountze Bros.), 103 F.2d 785, 789 (2d Cir.1939) (special deposit designation requires proof of both special purpose and intent).
Essentially, determining whether mutuality exists involves consideration of a range of circumstances and finally a factual determination as to whether the account is sufficiently general to be considered available for a simple adjustment of accounts, such as a setoff. “The right of setoff ... allows entities that owe each other money to apply their mutual debts against each other, thereby avoiding ‘the absurdity of making A pay B when B owes A.’ ” Citizens Bank, 516 U.S. at 18, 116 S.Ct. 286 (1995) (quoting Studley v. Boylston Nat’l Bank, 229 U.S. 523, 528, 33 S.Ct. 806, 57 L.Ed. 1313 (1913)). Because the funds here were not held in trust, were not segregated, and for the most part could be withdrawn by the debtor according to the timetable established by the debtor in its contract with the bank, the bankruptcy court did not err in finding the debts at issue to be mutual.
The next issue is whether 11 U.S.C. § 553(a)(3)3 precludes setoff of the otherwise qualifying mutual debts. If the debt was incurred for the purpose of achieving setoff rights, it is barred by 11 U.S.C. § 553(a)(3). After examining the average balance in the account, which remained relatively constant for over a year, the bankruptcy court concluded that there was no evidence of deliberate buildup of the account in order for the bank to obtain a setoff position. See Bennett, 212 B.R. at 216 (describing and agreeing with the bankruptcy court’s analysis). The bankruptcy court also did not err in making this finding.
Finally, allowance of a setoff is a decision that lies within the sound discretion of the bankruptcy court. Bohack, 599 F.2d at 1165, Shugrue v. Fischer (In re Ionosphere Clubs, Inc.), 164 B.R. 839, 841 (Bankr.S.D.N.Y.1994) (setoff scrutinized in light of goals and objectives in Bankruptcy Code). The trustee argues that the compelling eir-*141cumstance that required the bankruptcy court to disallow the otherwise valid setoff is the fact that the funds on deposit were derived from a fraudulent scheme. We do not find that the bankruptcy court abused its discretion in recognizing the setoff rights of the bank. The bank received nothing more or less than what it was entitled to under New York and Second Circuit law. The court was not required to deprive the financial institution of its rights in order to increase the chance of recovery of other equally innocent creditors. See Bohack, 599 F.2d at 1165.
Accordingly, we affirm the determination of the Bankruptcy Appellate Panel that the Bankruptcy Court did not abuse its discretion in lifting the automatic stay of bankruptcy to allow the bank to exercise its right of setoff.
AFFIRMED.
. The statement of facts is adapted from the Bankruptcy Appellate Panel decision. Official Comm. of Unsecured Creditors v. Manufacturers and Traders Trust Co. (In re Bennett Funding Group, Inc.), 212 B.R. 206, 209, 211 (B.A.P.2d Cir.1997).
. The statute reads, in pertinent part:
(a) Except as otherwise provided in this section and in sections 362 and 363 of this title, *139this title does not affect any right of a creditor to offset a mutual debt owing by such creditor to the debtor that arose before the commencement of the case under this title against a claim of such creditor against the debtor that arose before the commencement of the case,....
11 U.S.C. § 553(a).
. The statute provides an exception to the right of setoff if:
(3) the debt owed to the debtor by such creditor was incurred by such creditor -
(A)after 90 days before the date of the filing of the petition;
(B) while the debtor was insolvent; and
(C) for the purpose of obtaining a right of setoff against the debtor.
11 U.S.C. § 553(a)(3).