
35 B.R. 353 (1984)
In re MARKETING RESOURCES INTERNATIONAL CORP. (formerly PTC Marketing Services Corp.), Debtor.
MARKETING RESOURCES INTERNATIONAL CORP., Plaintiff,
v.
PTC CORPORATION, Defendant.
MARKETING RESOURCES INTERNATIONAL CORP., Plaintiff,
v.
PTC CORPORATION, Defendant.
Bankruptcy No. 83-01437G, Adv. Nos. 83-2028G, 83-2093G.
United States Bankruptcy Court, E.D. Pennsylvania.
January 4, 1984.
*354 William H. Ewing, Hangley, Connolly, Epstein, Chicco, Foxman & Ewing, Philadelphia, Pa., for debtor/plaintiffs, Marketing Resources Intern. Corp. (formerly PTC Marketing Services Corp.).
Matthew J. Siembieda, Andrew D. Bershad, Philadelphia, Pa., for defendants, PTC Corp.

OPINION
EMIL F. GOLDHABER, Bankruptcy Judge:
The matter in dispute is whether we should grant the plaintiff's motions to dismiss the counterclaims for setoff which were filed in response to the plaintiff's complaints for avoidance of alleged preferential transfers under 11 U.S.C. § 547(b) of the Bankruptcy Code ("the Code"). For the reasons stated herein we will grant one motion and deny the other.
The facts of the cases viewed in the light most favorable to the defendant in this motion to dismiss are as follows:[1] Marketing Resources International Corp. ("the debtor") filed a petition for relief under chapter 7 of the Code on April 7, 1983, although both cases were subsequently converted to chapter 11. Shortly thereafter the debtor commenced two adversary actions against PTC Corporation ("PTC"). In the first action[2] the debtor alleges that, within one year prior to the filing of its petition, one of its assets was a fifty percent interest in a portion of a law suit instituted by PTC against International Business Machines Corporation ("IBM"). *355 The litigation was settled by a payment made by IBM to PTC in an amount in which the debtor had a $100,000.00 interest. Within one year of the filing of the petition PTC applied the $100,000.00 in partial satisfaction of a debt which arose from the debtor's purchase of PTC's stock in November of 1981. The debtor asserts that PTC was an "insider" within the meaning of 11 U.S.C. § 101(25)(B). The debtor instituted the first action against PTC alleging that PTC's application of the $100,000.00 fund against the indebtedness for stock was a voidable preference under § 547(b). PTC answered the complaint, raising numerous defenses, and asserting a counterclaim for a setoff based on the debtor's indebtedness for the 1981 stock purchase.
The second action[3] was commenced by the debtor under 11 U.S.C. § 542(b) to recover from PTC $87,216.47 for the payment of goods and services rendered to it by the debtor in the last three months of 1982. PTC filed an answer which contained two counterclaims in which PTC sought, inter alia, a setoff against the debtor's claim. The first counterclaim alleges that the debtor owes PTC $57,657.22 plus interest on a debt, made for purposes undisclosed in the record, that arose in November of 1981. In the second counterclaim PTC asserts that the debtor owes it $33,000.00 for the rental of realty and equipment for the period from November of 1982 to the filing of the petition.
In both actions the debtor has moved for dismissal of the counterclaims for setoff. In the first, the debtor presents three grounds in support of its motion: (1) the claimed setoff is inappropriate since the debts are not mutual; (2) the asserted setoff is unavailable since PTC's debt to the debtor did not arise prior to the filing of petition for relief; and finally, (3) PTC has not yet returned the preferential payment to the debtor as a necessary prerequisite to setoff. In the second action the debtor relies solely on the third contention stated immediately above.
Under the first and second bases for dismissal of the first motion the debtor asserts that setoff cannot be accomplished since the necessary element of mutuality of obligations is lacking. The debtor contends that its debt to PTC arose in November of 1981, which was prior to the filing of the petition for relief, while the debtor's claim against PTC for avoidance of the preference arose after the filing of the petition. The rule is that "postpetition obligations may be setoff against one another. Similarly, prepetition obligations may also be offset. However, a postpetition obligation . . . may not be setoff against a prepetition obligation of the debtor, since there is a lack of mutuality of obligation. This conclusion is premised on the theory that the prepetition debtor and the debtor in possession are separate and distinct entities." In Re Shoppers Paradise, Inc., 8 B.R. 271, 277-78 (Bkrtcy.S.D.N.Y.1980) (cites omitted); T & B General Contracting, Inc. v. Ballenger Corp. (In Re T & B General Contracting, Inc.), 12 B.R. 234, 238 (Bkrtcy.M.D.Fla. 1981); Verco Industries v. Spartan Plastics, 704 F.2d 1134, 1139 (9th Cir.1983); Standard Oil Co. of New Jersey v. Elliot, 80 F.2d 158, 159-160 (4th Cir.1935), cert. den., 296 U.S. 604, 56 S.Ct. 120, 80 L.Ed. 428. Although the parties agree that PTC's claim against the debtor arose prior to the filing of the petition, the debtor contends that its claim against PTC did not come about until after the petition was filed since an action under § 547(b) can only be commenced after the filing of such a petition. We find the debtor's analysis to be faulty since the mutuality needed for setoff is not gauged by the time of the commencement of the preference action or the filing of the petition; it is determined by the time the debt underlying the alleged preference arose, which, in the case at bench, is either when the debtor first acquired an interest in the IBM law suit or when payment of settlement was made, both of which occurred prior to the filing of the petition for relief. Consequently, both claims ostensibly subject *356 to setoff arose prepetition and thus meet the test of mutuality.
Under the contention that the counterclaims should be dismissed since PTC has not yet returned the preferential payment to the debtor as a necessary predicate to setoff, the debtor cites 11 U.S.C. § 502(d) which states as follows:
(d) Notwithstanding subsections (a) and (b) of this section, the court shall disallow any claim of any entity from which property is recoverable under section 542, 543, 550, or 553 of this title or that is a transferee of a transfer avoidable under section 522(f), 522(h), 544, 545, 547, 548, 549, or 724(a) of this title, unless such entity or transferee has paid the amount, or turned over any such property, for which such entity or transferee is liable under section 522(i), 542, 543, 550, or 553 of this title.
Although the debtor's two actions are brought under §§ 547 and 542, which are designated in § 502(d), we find that this section has no effect on the dismissal of the counterclaims. We agree with the position of PTC that the application of § 502(d) is premature since judgment has not yet been entered on the debtor's actions under §§ 547 and 542. Section 502(d) embraces the situation where the debtor or the trustee successfully prosecutes an action against a party under one of the sections designated in that section. In the event the party refuses to comply with the judgment, the court must disallow that party's claim to prevent it from sharing in the distribution of the bankruptcy estate. 3 Collier on Bankruptcy ¶ 502.04 (15th ed. 1982). Thus, in the case confronting us § 502(d) is not yet operative since no judgment has yet been entered on the debtor's claims.
In addressing the merits of § 502(d) the debtor cites authority which states that in a preference action brought by the debtor or the trustee, the defendant cannot setoff his liability on the preference against the original debt that was putatively satisfied with the preferential transfer. Mechanics' Bank v. Ernst, 231 U.S. 60, 62, 34 S.Ct. 22, 58 L.Ed. 121 (1913); Rotan Grocery Co. v. West, 246 F. 685, 686 (5th Cir. 1917); Walker v. Wilkinson, 296 F. 850, 852 (5th Cir.1924), cert. den. 262 U.S. 746, 43 S.Ct. 522, 67 L.Ed. 1212; Shaw v. Walter E. Heller & Co., 385 F.2d 353, 357 (5th Cir. 1967), cert. den. 390 U.S. 1003, 88 S.Ct. 1248, 20 L.Ed.2d 104. In the absence of this rule no preference action could be successfully maintained. As stated in Walker, 296 F. at 852:
It has been decided that, in an action by a trustee to recover money paid a creditor by way of preference, the creditor cannot set off against his liability for the return of the preferential payments the original debt on which the payments were applied. Rotan Grocery Co. v. West, 246 Fed. 685, 158 C.C.A. 641; Mechanics' Bank v. Ernst, 231 U.S. 60, 34 Sup.Ct. 22, 58 L.Ed. 121. The reason is, to permit this to be done would defeat the right to recover the preference, and render the statute futile. In such a case the transaction is single, and results in a depletion of the fund that would otherwise have gone to creditors to the extent of the preferential payments. Allowing the creditor to set off the debt due him against the payments received by him would leave the preference unremedied. In this class of cases, the right to offset is denied, because the estate has been depleted to the detriment of creditors of like class, and to allow the right of set-off would perpetuate the depletion.
Since the counterclaim in the debtor's first action against PTC seeks a setoff of the preference against the original debt that was satisfied with the preferential transfer, the claim will be dismissed. In the second action PTC's setoff claims are not the subject matter of the preference action and thus we will deny the motion to dismiss these claims.
NOTES
[1]  This opinion constitutes the findings of fact and conclusions of law required by Bankruptcy Rule 7052 (effective August 1, 1983).
[2]  Adversary No. 83-2028.
[3]  Adversary No. 83-2093.
