
127 B.R. 233 (1991)
In re Edward R. BUCKENMAIER and Anna Marie Buckenmaier, Debtors.
CAMELBACK HOSPITAL, INC., Appellant,
v.
Anna Marie BUCKENMAIER, Gary Shield, Edward Buckenmaier, Robert Vucurevich, Trustee, and James F. Campbell, M.D., Appellees.
BAP No. AZ-90-1703-VAsP, Bankruptcy No. 87-0153-PHX-SSC.
United States Bankruptcy Appellate Panel of the Ninth Circuit.
Argued and Submitted on January 25, 1991.
Decided May 20, 1991.
*234 Donald Froeb, Phoenix, Ariz., for appellant Camelback Hosp.
Donald D. Skypeck, Phoenix, Ariz., for appellee Edward Buckenmaier.
Keith Forsyth, Phoenix, Ariz., for appellee Anna Buckenmaier.
Douglas Wymore, Phoenix, Ariz., for appellee Gary Shield.
Before VOLINN, ASHLAND and PERRIS, Bankruptcy Judges.

OPINION
VOLINN, Bankruptcy Judge:

OVERVIEW
Appellant Camelback Hospital, Inc. ("Camelback" or "Hospital") appeals from an order which bars its contingent claim for contribution against debtor Edward Buckenmaier ("Buckenmaier"). Camelback's principal contention is that it should be permitted to setoff its contribution claim against any monies Buckenmaier may potentially recover in his own action now pending against Camelback.
We reverse and remand for the purpose of entering an order consistent with this opinion.

FACTUAL BACKGROUND
On March 26, 1985, Buckenmaier admitted himself to Camelback complaining that he was afraid that he might kill his wife, Anna Marie Buckenmaier ("Mrs. Buckenmaier"), or himself. The treating psychiatrist was Dr. James L. Campbell. Buckenmaier apparently believed that his wife was having a romantic affair with Gary Shield ("Shield"). For reasons that are disputed, Buckenmaier was discharged from the hospital later that same day. After his discharge, he went to find his wife and ultimately *235 located her with Shield outside Shield's house. Buckenmaier stabbed them both. He was charged with two counts of attempted murder but pled guilty to aggravated assault. He served two years in an Arizona state prison.
The immediate legal sequelae to the assault were three state court personal injury actions that were filed in the Arizona state Superior Court of Maricopa County in November, 1986, February, 1987 and March, 1987, respectively. The three lawsuits were subsequently consolidated into a single action ("the personal injury action"). Mrs. Buckenmaier and Shield sued Buckenmaier for negligence in the attack itself as well as in his failure to obtain proper psychiatric treatment.[1] They also sued Camelback and Dr. Campbell for medical malpractice. Buckenmaier brought his own lawsuit against Camelback and Dr. Campbell contending that he suffered negligent treatment at the Hospital. Discovery has been completed and a trial had been scheduled to go forward in July, 1990. Camelback and Dr. Campbell have asserted that they possess unmatured rights of contribution and indemnification against Buckenmaier, but have not yet filed such claims in the state court action.[2]

PROCEEDINGS BELOW
Buckenmaier and his wife filed a joint petition for relief on January 7, 1987.[3] The schedules accompanying the petition listed the personal injury action as a potential source of additional assets of the estate. On January 16, 1987, Robert Vucurevich was appointed the Chapter 7 trustee. On January 23, 1987, the bankruptcy court gave notice to all creditors and interested parties of the filing deadline for all nondischargeability complaints pursuant to Bankruptcy Code §§ 523(c) and 727. Appellant Camelback did not file a nondischargeability complaint nor did it object to the debtors' discharge. On May 20, 1987, the debtors received their discharge, and notice thereof was given to creditors and interested parties on November 7, 1987.
On March 29, 1988, debtors moved for an order deeming the state court personal injury actions abandoned by the estate under Code § 554(b). The court denied this motion in an order dated June 16, 1988. On February 3, 1989, the debtors and the trustee entered into a stipulation in which they agreed to split evenly between the estate and Buckenmaier any recovery which Buckenmaier might obtain from his negligence action against the hospital and doctor. This stipulation was never approved by the bankruptcy court.
In September, 1989, Buckenmaier moved in state court to have the action against him dismissed as a violation of his discharge from bankruptcy. Although the details are not fully disclosed by the record, it appears that the state court judge requested guidance from the bankruptcy court on this and related questions.
In November, 1989, the trustee, Buckenmaier[4], Mrs. Buckenmaier and Shield entered into two stipulations requesting modification of the automatic stay and Buckenmaier's discharge. Under the stipulations, the parties agreed to permit Buckenmaier to continue as a nominal defendant in the state court actions in order to allow for a recovery against Buckenmaier's insurance company. The parties also agreed that the bankruptcy court should recommend to the district court that it abstain from taking jurisdiction of the personal injury action. The bankruptcy court initially approved the stipulations but later rescinded its order to permit further briefing. Finally, on May *236 25, 1990, the court issued a lengthy oral decision ("Oral Decision") approving the stipulations, and on July 5, 1990 entered a written order summarizing its conclusions ("July 5, 1990 Order") which is the subject of this appeal.
The trial court's July 5, 1990 Order provides absolute protection for Buckenmaier's personal assets by specifically prohibiting the parties to the personal injury action from proceeding against Buckenmaier on any claims. Under the order, Buckenmaier may participate as a defendant in the action but only to the extent that he is a "nominal" defendant and will not be subject to any personal liability. More particularly, paragraph 2 of the order precluded "claims for indemnity or contribution" against Buckenmaier.[5] Nevertheless, the court permitted Buckenmaier to continue prosecuting his own personal injury lawsuit against Camelback and Dr. Campbell. However, the Oral Decision, without adverting to the issue, simply leaves it an open question whether Buckenmaier will be permitted to reap any personal financial benefit from his cause of action.
Camelback has filed this appeal to challenge the order insofar as it insulates Buckenmaier from Camelback's contribution claim even as an offset against Buckenmaier's personal recovery, if any, in his lawsuit against Camelback.

ISSUES
While appellant raises numerous tangential questions, the critical issue in this appeal is whether the trial court was correct in foreclosing appellant Camelback from offsetting its contribution claim against the potential recovery which the discharged debtor may obtain against the Hospital.

STANDARD OF REVIEW
The disallowance of a setoff is within the discretion of the trial court and will not be set aside unless found to be a clear abuse of discretion. Melamed v. Lake County Nat. Bank, 727 F.2d 1399, 1404 (6th Cir.1984); Riggs v. Government Emp. Financial Corp., 623 F.2d 68, 73-74 (9th Cir.1980).

DISCUSSION
Before proceeding further, it is helpful to understand the extent to which Camelback's setoff claim is contingent. The events that must come to pass for this inchoate claim to mature are as follows: first, Mrs. Buckenmaier and Shield must prevail in their personal injury action against both Buckenmaier and Camelback; second, Camelback must ultimately pay more of the judgment than its assessed pro rata share of the total liability;[6] third, the state court must rule for Buckenmaier (or the trustee) in Buckenmaier's negligence action against Camelback. Camelback's setoff claim for contribution arises only if all of these events occur.
There are two principal sub-issues in this case: (a) whether the right of setoff survives § 524(a)(2)'s injunction against the commencement or continuation of any action against the debtor's assets; and (b) whether Camelback has a valid setoff claim.
A. Relationship of § 553(a) with § 524(a)(2)
Buckenmaier's principal argument on appeal is that the debtor's discharge bars Camelback from asserting any claim, for setoff or otherwise, against Buckenmaier. *237 He relies upon § 524(a) which holds in pertinent part:
(a) A discharge in a case under this title
. . . .
(2) operates as an injunction against the commencement or continuation of an action, the employment of process, or an act, to collect, recover or offset any such debt as a personal liability of the debtor, whether or not discharge of such debt is waived;
(Emphasis added.) There is an apparent inconsistency between this prohibition of offsets and § 553's recognition of setoff rights. Section 553(a) provides:
(a) Except as otherwise provided in this section and sections 362 and 363 of this title, this 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, except to the extent that. . . .
(Emphasis added.)
Most cases hold that a valid setoff claim cannot be defeated by a discharge in bankruptcy. These cases rely on § 553's statement that, with certain exceptions not applicable here, "this title does not affect any right of a creditor to offset. . . ." This language has been interpreted to mean that a creditor's right to setoff a mutual, pre-petition debt survives even the discharge of the debtor, because it would "be unfair to deny a creditor the right to recover an established obligation while requiring the creditor to fully satisfy a debt to a debtor." In re Davidovich, 901 F.2d 1533, 1539 (10th Cir.1990) (quoting In re G.S. Omni Corp., 835 F.2d 1317, 1318 (10th Cir. 1987)); see also In re Service Decorating Co., 105 B.R. 859, 862-63 (N.D.Ill.1989); In re Morgan, 77 B.R. 81, 85 (Bankr.S.D.Miss. 1987); In re Ford, 35 B.R. 277, 279-80 (Bankr.N.D.Ga.1983); In re Slaw Constr. Corp., 17 B.R. 744, 748 (Bankr.E.D.Pa. 1982). Contra In re Johnson, 13 B.R. 185, 188-89 (Bankr.M.D.Tenn.1981) (holding that an attempted setoff in response to a debtor's post-petition lawsuit was enjoined by § 524(a)(2) notwithstanding that acts giving rise to action occurred pre-petition).
Buckenmaier relies upon numerous cases that support the proposition that Camelback's contribution claim is a pre-petition claim which would be barred by § 524's injunction and by § 727(b)'s "discharge of all [pre-petition] debts" if it were asserted in an affirmative action for relief. These cases do not involve setoff claims and therefore do not deal with the problem posed by the present appeal, i.e., an attempt by a creditor to use a setoff claim as a defensive weapon to reduce a recovery obtainable by the debtor against it.
Accordingly, Camelback's setoff claim survives Buckenmaier's discharge from bankruptcy.
B. Camelback's Setoff Claim
The doctrine of setoff dates back to Roman law and was recognized by the equity courts in England. 4 Collier on Bankruptcy, § 553.01, 553-3 (15th Ed.1990). It was made a part of the English bankruptcy law in 1705, and became a part of American bankruptcy law in 1800. Id.; Bohack Corp. v. Borden, Inc., 599 F.2d 1160, 1164-65 (2d Cir.1979). "In general, setoffs are allowed in bankruptcy to the extent that they are based upon mutual obligations existing between the debtor and a creditor, based on a concept of fairness, in order to prevent injustice." In re Pieri, 86 B.R. 208, 210 (9th Cir. BAP 1988). The Code does not create or expand the setoff right but instead "merely preserves the common-law right under applicable non-bankruptcy law." Id. Pursuant to § 362(a)(7), setoffs are stayed pending determination by the bankruptcy court that a setoff is proper and should be allowed. While setoffs are generally favored they are not automatically permitted. Id. (relying upon Melamed v. Lake Country Nat. Bank, 727 F.2d 1399, 1404 (6th Cir.1984)). It has been held, however, that because the setoff right is an established part of our bankruptcy laws, it should be enforced "unless compelling circumstances . . ." require otherwise. Bohack *238 Corp. v. Borden, Inc., 599 F.2d at 1165.
In the present case, Arizona law recognizes the right to setoff, and it is self-evident that this right is consistent but not identical with a claim of contribution by one tortfeasor against another: "[a] set off or counterclaim is a demand which the defendant has against the plaintiff arising out of a transaction extrinsic to the plaintiff's cause of action, whereas a recoupment is a reduction by the defendant of a part of the plaintiff's claim because of a right in the defendant arising out of the same transaction." Morris v. Achen Const. Co., Inc., 155 Ariz. 507, 510, 747 P.2d 1206, 1209 (Ct.App.1986), aff'd in relevant part, 155 Ariz. 512, 747 P.2d 1211 (Ariz.1987). If anything, the concept of contribution is broader than that of setoff. While the setoff right of a defendant (here Camelback) is capped by the recovery of the plaintiff (here Buckenmaier), the amount recoverable in an ordinary action for contribution is not similarly limited.
Code § 553(a) requires Camelback to establish two elements before a setoff may be asserted: timing and mutuality. In re Verco Industries, 704 F.2d 1134, 1139 (9th Cir.1983). It appears that both criteria have been satisfied.
The timing element requires that both claims arose pre-petition. Both Buckenmaier's tort claim against Camelback and Camelback's contribution claim are pre-petition claims. This conclusion derives from the Code's extremely expansive definitions of the terms "claim" and "debt." As the United States Supreme Court recently explained in Pennsylvania Department of Public Welfare v. Davenport, ___ U.S. ___, 110 S.Ct. 2126, 109 L.Ed.2d 588 (1990), the meanings of these two terms are "coextensive." Id. 110 S.Ct. at 2128. Code § 101(11) defines "debt" as a "liability on a claim." A "claim" is defined by the Code in § 101(4)(A) as a "right to payment, whether or not such right is reduced to judgment, liquidated, unliquidated, fixed, contingent, matured, unmatured, disputed, undisputed, legal, equitable, secured or unsecured." This latter definition "reflects Congress' broad rather than restrictive view of the class of obligations that qualify as a `claim' giving rise to a `debt.'" Davenport, 110 S.Ct. at 2130.
While there is no dispute that Buckenmaier's negligence action should be classified as pre-petition, Buckenmaier argues that Camelback's contribution action is a post-petition claim. However, numerous cases have held that under the broad definition of the term "claim," contribution and indemnification claims arise at the "time when the acts giving rise to the alleged liability were performed," and not when the claims technically accrue under state law. In re A.H. Robins Co., Inc., 63 B.R. 986, 993 (Bankr.E.D.Va.1986), aff'd 839 F.2d 198 (4th Cir.1988), cert. dismissed, 487 U.S. 1260, 109 S.Ct. 201, 101 L.Ed.2d 972 (1988) (quoting In re Johns-Manville Corp., 57 B.R. 680, 690 (Bankr.S.D.N.Y. 1986)). See also In re Black, 70 B.R. 645 (Bankr.D.Utah 1986); In re Edge, 60 B.R. 690 (Bankr.M.D.Tenn.1986). Contra Matter of M. Frenville Co., Inc., 744 F.2d 332 (3d Cir.1984), cert. denied, 469 U.S. 1160, 105 S.Ct. 911, 83 L.Ed.2d 925 (1985). Here, the claim for contribution arises from the 1985 stabbing incident, and it is therefore a pre-petition claim, notwithstanding that the cause of action for contribution has not yet accrued.
With respect to mutuality, the question is a close one. In order for debts to be mutual, "something must be `owed' by both sides." 4 Collier on Bankruptcy, §§ 553.04, 553.18 (15th Ed.1990). While most cases involve two contractual debts, it is established that the two debts need not arise from the same transaction or be of the same character. Id. at 553-19. Thus, tort claims may be setoff against contractual ones which arise from totally different transactions and incidents. In re Diplomat Electric, Inc., 499 F.2d 342 (5th Cir. 1974) (involving defamation judgment and unrelated contractual debt); In re Barry P. Parker's Inc., 33 B.R. 115 (M.D.Tenn. 1983) (involving negligence claim arising from traffic accident and unrelated debt on service contract); 4 Collier on Bankruptcy, § 553.04, 553-19 (15th Ed.1990).
*239 Given this flexible rule of mutuality, Buckenmaier's recovery on its claim against Camelback and the Hospital's contribution claim do appear to be mutual, even though these claims may never come into being. Buckenmaier argues that because of the "multiple contingencies" involved, the setoff issue is not ripe for determination by the BAP. However, the Bankruptcy Code, with its expansive definitions of the terms "claim" and "debt," protects the right of a creditor to assert a setoff despite the lack of certainty that the claim will actually accrue.
The trial court's decision does not discuss the setoff question. However, there is no doubt that the July 5, 1990 Order at least arguably prohibits the assertion of any setoff claim for contribution against Buckenmaier. It states that Buckenmaier's discharge from bankruptcy operates as a permanent injunction against the bringing of any claims affecting his personal liability "including, without limitation, direct claims against Mr. Buckenmaier, and claims for indemnity or contribution,. . . ." (Emphasis added.) We find that this language constitutes a prohibition against the assertion of Camelback's contingent setoff claim, and to that extent, must be vacated.
Finally, it appears that for one reason or another, all the parties who have been or will be injured by Buckenmaier's criminal assault have not objected to his discharge. Having averted financial responsibility for this misconduct, Buckenmaier now seeks not only compensation for his crime but also to preclude a setoff against his own claim by those who may be financially responsible to his victims. The law should not be mechanically applied so as to countenance such an unjust result.

CONCLUSION
Camelback's setoff of its contingent claim for contribution is not enjoined under Code § 524(a)(2). This setoff is allowable, pursuant to Code § 553(a), against any personal recovery by Buckenmaier against the Hospital. Accordingly, we reverse the trial court's decision insofar as it prohibits the Camelback contingent setoff claim, and remand the matter back to the trial court for entry of an order consistent with this opinion.
NOTES
[1]  The claims of Mrs. Buckenmaier and Shield were framed solely in terms of negligence because Buckenmaier's liability insurance did not cover harm caused by intentional torts.
[2]  Camelback and Dr. Campbell both filed contingent claims for contribution and indemnification in the bankruptcy court on December 15, 1989 and January 30, 1990, respectively.
[3]  Unless otherwise indicated, all chapter and section references are to the Bankruptcy Code, 11 U.S.C. §§ 101-1330.
[4]  Apparently, Buckenmaier has been represented by two law firms in the personal injury action: Crowe & Scott represents him in his capacity as a plaintiff and Gallagher & Kennedy, P.A., represents him in his capacity as one of the defendants.
[5]  As previously indicated, while Buckenmaier's assault might have been the subject matter of a dischargeability action under § 523(a)(6), the intentional tort section of the Bankruptcy Code, it is alleged that his insurance covers injuries resulting only from negligent conduct.
[6]  Under the applicable Arizona law of contribution and comparative negligence in effect at the time the personal injury lawsuits were filed, juries may assess among the tortfeasors percentages of liability. A.R.S. § 12-2502 (Supp.1990). Where a joint tortfeasor's payment on a judgment represents more than its share of culpability, that defendant is entitled to seek contribution from the other tortfeasors. A.R.S. § 12-2501 (Supp.1990); see Gehres v. City of Phoenix, 156 Ariz. 484, 753 P.2d 174 (Ct.App. 1988). Further, the defendant seeking contribution may initiate such an action within one year after the judgment becomes final. A.R.S. § 12-2503 (Supp.1990).
