The appellants appeal from an order of the bankruptcy court dated April 19, 2005, denying their claim for administrative expenses. For the reasons stated below, we reverse.
Facts & Procedural History
The parties jointly own an oil and gas well in North Dakota. The debtor operates it and owns approximately 50 percent of the working interest. The appellants own approximately 45 percent of the working interest in the well. The parties divide income and expenses based on these percentages.
The debtor filed its Chapter 11 petition in October 2002. Post-petition, the well turned a profit of approximately $1 million but the debtor used the proceeds to pay operating expenses and debts unrelated to the well instead of distributing the appellants’ share of the funds to them.
The appellants sought allowance under 11 U.S.C. § 503(b)(1)(A) for administrative expenses in the amount of $399,089.65 for *580their share of the post-petition gross revenues. The debtor did not dispute the amount of the claim nor did it dispute the claim’s status as an administrative expense, but asserted a right to a contractual penalty offsetting most of the claim. After a trial on the matter, the bankruptcy court ruled that the appellants did not have an administrative expense claim, first because there was no post-petition transaction from which the debt arose, second because the appellants incurred no actual expense, third because the appellants took the incompatible positions that the expenditure of their share of the funds benefitted the estate while also arguing that the debtor’s management of the well was improper, and finally because the appellants did not put money, goods, or services into the debtor to increase the likelihood of a successful reorganization. The bankruptcy court also ruled against the debtor on its setoff claim.
Standard of Review
The decision to award administrative expense priority is within the discretion of the bankruptcy court, and such a decision is reviewed for abuse of discretion. Vafer Inv. Group, L.L.C. v. Case (In re Visionaire Corp.), 299 B.R. 530, 532-33 (8th Cir. BAP 2003). A court abuses its discretion “when its ruling is founded on an error of law or a misapplication of law to the facts.” Id. (quoting First Nat’l Bank of Olathe, Kansas v. Pontow (In re Pontow), 111 F.3d 604, 609 (8th Cir.1997) and Sholdan v. Dietz (In re Sholdan), 108 F.3d 886, 888 (8th Cir.1997)).
Discussion
“Administrative expenses” include “the actual, necessary costs and expenses of preserving the estate”. § 503(b)(1)(A). To be entitled to priority status for administrative expenses, the creditor must prove that (1) it has a claim against the estate and (2) the claim arose as a cost of administration. AgriProces-sors, Inc. v. Iowa Quality Beef Supply Network, L.L.C. (In re Tama Beef Packing, Inc.), 290 B.R. 90, 95 (8th Cir. BAP 2003). A court must consider whether the expense arose from a transaction with the estate and whether it tangibly benefitted the estate. Id. at 96 (citing Williams v. IMC Mortgage Co. (In re Williams), 246 B.R. 591, 594 (8th Cir. BAP 1999)).
In this case, the bankruptcy court ruled that the appellants do not have an administrative expense claim because it did not involve a post-petition transaction with the estate. The court found that the appellants’ claim is based on their pre-petition ownership rights, and that the appellants did not incur any expense or provide an outlay of costs to the bankruptcy estate.
The parties’ agreement regarding revenue distribution was indeed a pre-petition agreement. However, the appellants’ right to a share of the revenue at issue here arose when the profits became available and should have been distributed; in other words, their claim is against post-petition assets which were derived from the post-petition production and sale of oil and gas. The bankruptcy court misapplied the law to the facts in ruling otherwise.
The term “transaction” is broadly defined. Distilled to its essence, it is an act between parties which alters their legal relationship, as is stated in the legal definition adopted previously by this court:
[A transaction is] [a]n act of transacting or conducting any business; between two or more persons; negotiation; that which is done; an affair. An act, agreement, or several acts or agreements between or among parties whereby a cause of action or acceleration of legal rights occur. It may involve selling, leasing, *581borrowing, mortgaging or lending. Something which has taken place, whereby a cause of action has arisen. It must therefore consist of an act or agreement, or several acts or agreements having some connection with each other, in which more than one person is concerned, and by which the legal relations of such persons between themselves are altered. It is a broader term than “contract.”
Trustees of the Trism Liquidating Trust v. IRS (In re Trism, Inc.), 311 B.R. 509, 516—17 (8th Cir. BAP 2004) (quoting Black’s Law Dictionary 1496 (6th ed. rev.1990)), aff'd, 126 Fed.Appx. 339 (8th Cir.2005).
In this case, the transaction was the debtor’s post-petition act of exercising control of all the profits, thereby depriving the appellants of their revenue. By the debtor’s actions, the appellants were unwittingly forced to make a post-petition investment in the business to keep it operating.
Having found the existence of a post-petition transaction, we turn to the issue of benefit to the bankruptcy estate. The appellants must demonstrate that the expenditure provided a tangible benefit to the estate. Tama Beef Packing, 290 B.R. at 96. The theory behind such a requirement is that the estate’s creditors should pay for those expenses necessary to produce the distribution to which they are entitled. Texas v. Lowe (In re H.L.S. Energy Co., Inc.), 151 F.3d 434, 437 (5th Cir.1998) (citing 3 Daniel R. Cowan, Bankruptcy Law & Practice § 12.23(e)(1), at 83 (6th ed.1994)).
Here, the debtor retained the funds in the estate and used at least some of the money to pay operating expenses and keep the business going. As noted above, this was an involuntary infusion of cash by the appellants which permitted the debtor to maintain operations and therefore indirectly benefitted all creditors. The bankruptcy court’s conclusions to the contrary in this regard result from an erroneous application of the law to the facts.
For the reasons stated above, the bankruptcy court’s order denying the appellants’ claim for administrative expenses is reversed. The appellant is entitled to an administrative expense claim in the amount of $333,089.65.