
38 B.R. 964 (1984)
In re MILANO TEXTILES, INC., Debtor.
Bankruptcy No. 82-00371-L.
United States Bankruptcy Court, D. Massachusetts.
April 27, 1984.
*965 Stephen M. Kaplan, Widett & Glazier, Boston, Mass., for Malden Trust Co.
John S. Rodman, Gargill, Sassoon & Rudolph, Boston, Mass., for debtor.

MEMORANDUM DECISION AND ORDER
THOMAS W. LAWLESS, Chief Judge.
The issue before the Court is whether Malden Trust Company's setoff of certain money (the "collateral") it was holding prior to the filing of Milano Textiles, Inc.'s (the "Debtor's") Chapter 11 petition was proper and thus served to eliminate the Debtor's rights in the collateral or whether the setoff was improper and thus the collateral was and is property of the Debtor's estate, subject to this Court's adjudication of the parties' claims of entitlement.
The procedural posture in which the matter has come before the Court is somewhat unusual but has not been objected to by the relevant parties involved. Nor are the facts necessary to today's decision in dispute, only the conclusions of law to be drawn therefrom. In September, 1980, the Debtor entered into a secured financing arrangement with the following five lenders: The Economic Development Administration of the United States Department of Commerce (the "EDA"), the United States Small Business Administration (the "SBA"), Shawmut Bank of Boston, N.A., Malden Cooperative Bank, and Malden Trust Company (the "Malden Trust"). At this time, the lenders also entered into an intercreditor agreement wherein it was agreed that any and all collateral held by each of them would be held pari passu for the benefit of all five lenders to the extent of their respective loan balances. The intercreditor agreement also included a loan guarantee which provided for the assignment by the participating banks of their security interests and their rights under the agreement in exchange for payment of ninety percent of their loan balances, the EDA being the guarantor of Malden Trust, and the SBA as guarantor of Shawmut Bank of Boston and Malden Cooperative Bank.
The money loaned to the Debtor by Malden Trust was designed as a revolving credit account against which accounts receivables were to be used to establish a revolving line of credit. On or about September 3, 1981, the Debtor allegedly ceased remitting collections on the accounts receivables to Malden Trust and withdrew all funds from its depository account with that bank.
On or about October 6, 1981, Malden Trust notified the Debtor that it was in default and informed it that it owed Malden Trust $773,725.31. On December 24, 1981, Malden Trust filed a civil action in Middlesex Superior Court, Case No. 81-6501, seeking, inter alia, an attachment of those funds belonging to the Debtor that were in the possession of the Century Bank and Trust Company, and a transfer of those funds to the Malden Trust. On December 31, 1981, an order was issued attaching the funds of the Debtor held by Century Bank and Trust Co. in the sum of $100,000.00. In addition, the Superior Court, Adams, J., ordered the transfer of the funds on deposit with Century Bank and Trust Co. to Malden Trust, specifically ordering that the funds so attached and transferred were to be held "in escrow in a depository account pending further order of this Court."
As a result of the state court's order, "Milano Textile, Inc., Escrow Accounts # 1 and # 2" were opened at Malden Trust and labeled as such. The next event regarding these "escrow accounts" occurred on January 6, 1982, when Malden Trust by its attorneys, Fulman, Cooper and Fulman, filed a motion with the state court for *966 allowance from the "escrow accounts" of Malden Trust's expenses incurred by it for securing, maintaining and caring for the collateral. The requested expenses did not include any attorney fees. The Superior Court, Alberte, J., entered an order allowing these expenses on January 20, 1982.
On or about February 26, 1982, without court order, Malden Trust opened a third account entitled "Special Account for The Payment of Fees and Expenses of Milano Textiles, Inc." (the "Special Account"). On the same day, the sum of $17,570 was transferred to this newly-established Special Account from Escrow Account # 1.
On or about March 5, 1982, the firm of Fulman, Cooper and Fulman ("Fulman") presented a bill to Malden Trust in the amount of $17,570 for services rendered in connection with the debt owed Malden Trust by the Debtor. It is Malden Trust's contention that on March 8, 1982, prior to 3:00 P.M., a Treasurer's check was issued payable to Fulman in the amount of $17,570.00, such funds being in turn debited from the above-mentioned Special Account. The payment to Fulman was made without the authorization of the state court. At 3:43 P.M., on that same day, the Debtor filed its petition under Chapter 11 of the Bankruptcy Code.
It is Malden Trust's contention that the payment of Fulman's fee was authorized under the promissory note between it and the Debtor and that the Superior Court's order was inapplicable because the monies were not held in a true "escrow" account. Malden Trust asserts that under the loan documents it had an absolute right upon default up until the filing of the petition to setoff any debts against amounts in its possession. The Debtor disputes this contention and asserts that Malden Trust's setoff was violative of the state court order and that the funds held in "escrow" are subject to this Court's jurisdiction.
Generally, a creditor may offset a mutual debt owed to the debtor against a claim the creditor has against the debtor. The right is generally preserved in the Bankruptcy Code, which "does not affect any right of a creditor to offset a mutual debt owing by such creditor to the debtor. . . ." 11 U.S.C. § 553 (1979). The right of setoff, however, is limited by the automatic stay provisions of § 362. Before a setoff can be made against the debts owed by a petitioner in bankruptcy, a creditor must seek relief from the automatic stay. Even setoffs effected before bankruptcy may be investigated and reviewed by the bankruptcy court. Id. §§ 553(a)(3) and (b)(1). See United States v. Norton, 717 F.2d 767, 771 (3d Cir.1983).
As to the validity of pre-petition setoffs, state rather than federal law controls. See In re Saugus General Hospital, Inc., 698 F.2d 42 (1st Cir.1983). Accordingly, Massachusetts law governs in the instant case.
In Massachusetts it is well-settled that a bank cannot exercise a setoff against a deposit which is known by it to be dedicated to a special purpose. In re Saugus General Hospital, Inc., supra, at 47-48, citing In re Applied Logic Corp., 576 F.2d 952, 958 (2d Cir.1978) and Constructadora Maza, Inc. v. Banco de Ponce, 616 F.2d 573 (1st Cir.1980) (payroll account which bank knew was dedicated solely to satisfaction of employee paychecks is deposit dedicated to special purpose and may not be setoff). A bank impliedly binds itself, by accepting a special deposit, not to setoff against such a deposit a debt due it from the depositor. See 10 Am.Jur.2d Banks § 673 (1969). One characteristic that has been recognized as distinguishing a special purpose or restricted depository account from a "general deposit" is the absence of the depositor's ability to withdraw the funds at will. Constructadora Maza, Inc. v. Banco de Ponce, supra, at 579. See also In re Applied Logic Corp., supra.
In the instant case, the Debtor defaulted on its obligation to Malden Trust, whereupon Malden Trust sought relief in the Middlesex Superior Court. In ordering the attached funds be held "in escrow in a depository account pending further order of this Court", the state court was creating *967 an account of which the principal purpose was to protect and preserve the collateral, not only for Malden Trust, but for all other parties to the intercreditor agreement. The motion to pay Malden Trust's non-legal expenses associated with preserving the collateral indicates Malden Trust's awareness that it could not reach the collateral to reimburse it for its expenses without an order of the state court. Malden Trust was aware that the provisions in the promissory note allowing for the payment of its non-legal expenses were superceded by the state court order when it applied to the court for permission to pay same. The pertinent provisions that give Malden Trust the right to collect its non-legal expenses also provide for the payment of its legal expenses. Malden Trust's now argument that it did not need court approval for payment of its legal expenses is totally inconsistent with its prior actions.
Based upon the foregoing, I find that the state court order created a deposit which was dedicated to a special purpose against which Malden Trust could not exercise a valid setoff.
Moreover, it has long been recognized that a court of equity, which looks through form to substance, will treat a transaction according to its real nature. Citizens' National Bank of Gastonia v. Lineberger, 45 F.2d 522, 527-528 (4th Cir. 1930); Katz v. First National Bank of Glen Head, 568 F.2d 964, 970 (2d Cir.1977). In the instant case, even if a true "escrow" account was not established, it is evident that the deposit of the Debtor's funds pursuant to the state court order was not meant to establish a debtor-creditor relationship from which a right to setoff could arise. It is clear from the terms of the intercreditor agreement and the court order that all five secured lenders had an interest in the collateral and that the court did not want the money disbursed until their respective rights could be determined. To give effect to Malden Trust's setoff would be to elevate form over substance, disregard the true nature of the deposit, and undermine the integrity of the state court.
Finally, where a party deposits funds in a bank, ordinarily the funds become property of the bank and the bank becomes the debtor of the depositor. In re Tonyan Const. Co., Inc., 28 B.R. 714 (Bkrtcy.N.D.Ill.1983). See United States v. Butterworth-Judson Corp., 267 U.S. 387, 394, 45 S.Ct. 338, 340, 69 L.Ed. 672 (1925). In such a case, there is a mutuality of obligation out of which the bank's right of setoff arises. Id. Where, however, a bank has knowledge of a third person's interest in deposited funds, or notice of facts sufficient to put it upon inquiry as to the true character of the deposit, the debtor-creditor relationship is altered and the bank's right of setoff is subject to the rights of such third party. See United States v. Butterworth-Judson Corp., supra, at 395, 45 S.Ct. at 340; Union Stock Yards Bank v. Gillespie, 137 U.S. 411, 11 S.Ct. 118, 34 L.Ed. 724 (1890).
The uncontroverted facts show that Malden Trust had knowledge of the interest of third parties in the deposited funds and notice of facts sufficient to put it upon inquiry as to the true nature of the deposit. The intercreditor agreement entered into by Malden Trust with the four other lenders provided that any and all collateral held by each of them would be held pari passu for the benefit of all lenders to the extent of their respective loan balances. Malden Trust's unilateral setoff of the collateral for its own benefit violated the terms of the intercreditor agreement as well as the state court order.
Accordingly, Malden Trust is hereby ordered to reinstate the $17,570 in the Special Account; such sum to be held by Malden Trust until further order of this Court. Malden Trust shall have ten (10) days from the date of this order to file an appropriate motion for allowance of any claimed right of setoff against this fund. Copies of any such motion shall be served on the Debtor and the four other lenders under the intercreditor agreement. In the absence of such motion, the funds in the Special Account are ordered to be turned over to the Debtor. If a motion for setoff is filed, *968 opposition to said motion shall be filed within twenty (20) days of this order.
It is so Ordered.
