delivered the opinion of the court.
It is contended that the facts alleged as a partial defense constituted a valid counterclaim to the cause of action set forth in the complaint, and that in sustaining a demurrer to that part of the answer an error was committed.
1. The statute prescribes what an answer shall contain, and declares that it may include a counterclaim. Section 73, L. O. L.
“The counterclaim mentioned in Section 73 must be one existing in favor of a defendant, and against a plaintiff, between whom a several judgment might be had in the action, and arising out of one of the following causes of action: (1) A cause of action arising out of the contract, or transaction set forth in the complaint, as the foundation of the plaintiff’s claim; (2) in an action arising on contract, any other cause of action arising also on contract, and existing at the commencement of the action. The defendant may set forth by answer as many defenses and counterclaims as he may have. They shall each be separately stated, and refer to the causes of action which they are intended to answer, in such manner that they may be intelligibly distinguished.” Section 74, L. O. L.
This enactment does not contain the provision found in the Codes of many other states, to wit,- “or connected with the subject of the action.” In equity, however, it is sufficient if the counterclaim be connected with the subject of the suit. Section 401, L. O. L.; Dove v. Hayden, 5 Or. 500; LeClare v. Thibault, 41 Or. 601 (69 Pac. 552); Merrill v. Hexter, 52 Or. 138 (94 Pac. 972; 96 Pac. 865). While the common-law forms of action have been abolished in this State (Section 1, L. O. L.), the distinction between actions at law and suits in equity has not been abrogated. Section 389, L. O. L. Fireman’s Ins. Co. v. Oregon R. Co., 45 Or. 53 (76 Pac. 1075: 67 L. R. A. 161: 2 Ann. Cas. 360) ; Cohn v. Wemme, 47 Or. 146 (81 Pac. 981: 8 Ann. Cas. 508). At law a counterclaim is not sufficient if it be *507only connected with the subject of the action. Wait v. Wheeler & Wilson M. Co., 23 Or. 297, 301 (31 Pac. 661). The statute authorizing a counterclaim in an action at law to be interposed as a part of the first subdivision, to wit, “a cause of action arising out of the contract, * * as the foundation of the plaintiff’s claim,” was evidently designed as a substitute for “recoupment”; while the entire second subdivision was undoubtedly intended to take the place of “setoff.”
2. A “set-off” is not technically a mere matter of defense; it does not sound in damages whether liquidated or unsettled, but is a money demand by the defendant against the plaintiff arising upon contract and constituting a debt independent of and unconnected with the cause of action set forth in the complaint. Waterman, Set-Off (2 ed.) § 9; 25 Am. & Eng. Ency. Law (2 ed.) 495; 34 Cyc. 625; 7 Words & Phrases, 6442; Ansley v. Bank of Piedmont, 113 Ala. 467 (21 South. 59: 59 Am. St. Rep. 122) ; Lawton v. Ricketts, 104 Ala. 430 (60 South. 59) ; St. Louis & T. R. Packet Co. v. McPeters, 124 Ala. 451 (27 South. 518).
3. “Recoupment” is defined to be “the keeping back and stopping something which is due.” Waterman, Set-Off (2 ed.) § 457. Under the principles of the common law, “recoupment” could be invoked when the defendant sustained damages by reason of the plaintiff’s nonperformance of his part of the contract sued on, in which case the damages to which the defendant was entitled could be abated from the plaintiff’s claim. Waterman, Set-Off (2 ed.) § 458. “The defense of recoupment,” say the court in Baltimore & Ohio R. Co. v. Jameson, 13 W. Va. 833 (31 Am. Rep. 775, 777), “differs from set-off .in several important particulars: First, it is confined to matters arising out of, and connected with, the transaction or contract upon which the suit was brought; secondly, it has no *508regard to whether the claim be liquidated or unliquidated; thirdly, if the defendant’s claim exceed the plaintiff’s, he cannot in that action recover the balance due to him.”
4. The counterclaim authorized by statute is an enlargement of the scope of set-off and recoupment. Waterman, Set-Off (2 ed.) § 590; Wait v. Wheeler & Wilson M. Co., 23 Or. 297, 300 (31 Pac. 661). A text-writer, discussing this expansion, and referring to a term used in the statute authorizing a counterclaim, says:
“As the word ‘transaction’ seems to imply causes of action not necessarily upon contract, those arising from tort may perhaps, under proper circumstances, be the subject of counterclaim.” Pomeroy, Code Rem. (4 ed.) § 613.
At Section 618, of the work referred to, its author further observes:
“If a ‘transaction’ is set forth as the foundation of the plaintiff’s demand, the counterclaim must arise out of that ‘transaction’; and, so far as ‘transaction’ is something different from or additional to ‘contract’, this is a provision not identical in its effect with either ‘set-off’ or ‘recoupment’.”
In a note to Section 645, Mr. Pomeroy, criticising the conclusion reached in Edgerton v. Page, 20 N. Y. 281, 285, and other decisions based thereon, says:
“These cases all give a very narrow meaning to the term ‘transaction’ and incline to the position that a cause of action on contract, and one for tort, or two causes of action for tort, can never be said to arise out of the same transaction.”
In Section 647, in referring to the case of Conner v. Winton, 7 Ind. 523, Mr. Pomeroy further observes:
“In sustaining a demurrer to this answer the court suggested a rule of construction which may be followed in all cases.”
*509In the case thus adverted to, it was held that in actions ex contractu a counterclaim is a cause of action in favor of a defendant against a plaintiff and which might have arisen out of, or could have had some connection with, the original transaction, in view of the parties, and which, at the time the contract was made, they could have intended might, in some event, give one party a claim against the other for compliance or noncompliance with its provisions. In Wait v. Wheeler & Wilson M. Co., 23 Or. 297, 301 (31 Pac. 661), Mr. Justice Bean quotes with approval an excerpt from the case of Conner v. Winton, 7 Ind. 523.
It is impossible to reconcile the conflicting decisions that have been rendered, in determining what counterclaims can be properly interposed in certain law actions. It will be remembered that our statute omits the provision, “or connected with the subject of the action,” found in the Codes of many other states, authorizing the interposition of a counterclaim. In the absence of such condition, Mr. Chief Justice Thayer, in Loewenberg v. Rosenthal, 18 Or. 178, 184 (22 Pac. 601, 603), in construing subdivision 1 of what is now incorporated in our Code as Section 74, says:
“The clause, ‘a cause of action arising out of the contract or transaction set forth in the complaint as the foundation of the plaintiff’s claim,’ would imply that it arose out of some agreement or business affair between the parties.”
5. It is believed the rule promulgated in Conner v. Winton, 7 Ind. 523, to which Mr. Pomeroy refers as affording the correct test of when a counterclaim may be legally interposed, should be controlling, and that the clause in our statute, “a cause of action arising out of the * * transaction set forth in the complaint, as the foundation of the plaintiff’s claim,” should be so construed as to permit a counterclaim to be set up, when from the nature *510of the case it can readily be seen that the parties at the time the “transaction” culminated could have reasonably intended might in some event give rise to a cause of action by one against the other.
A sheriff or other officer might justify the seizure of property or the arrest of a person by producing the writ authorizing his action, but in the execution of the precept in writing he might unnecessarily use such force and cause such injury as would render him liable for the resulting damages. In the case at bar plaintiffs were, by the terms of the written contract, expressly authorized to take possession of the stock of shoes upon certain conditions, and in doing so it must have been understood by defendants 'that some interruption of their business must necessarily ensue. The part of their answer to which the demurrer was sustained avers that, in taking possession of the shoes and removing them, plaintiffs unnecessarily, wrongfully, and maliciously interrupted defendants’ business. It is not believed that at the time the contract was executed either of the parties could reasonably have anticipated that, in taking and removing the stock of goods from the store, the plaintiffs would have unnecessarily, wrongfully, and maliciously interrupted the defendants’ business.
6. The damages undertaken to be established as a partial defense to the action were unliquidated, but as to whether or not such a demand constitutes a valid counterclaim it is unnecessary to determine, for the measure of the injury alleged to have been sustained by defendants is so uncertain and speculative that the compensation to be awarded would be difficult of ascertainment by calculation (Godkin v. Bailey, 74 N. J. Law, 655: 65 Atl. 1032: 9 L. R. A. [N. S.] 1134; Coos Bay R. R. Co. v. Nosier, 30 Or. 547: 48 Pac. 361) ; and, such being the case, no error was committed in sustaining the demurrer to this part of *511the answer, assuming without deciding that a counterclaim based on a tort can be interposed to an action founded on a contract. See on this subject, however, the case of Zigler v. McClellan, 15 Or. 503 (16 Pac. 179).
7. It is maintained that the contract in question is not mutual, in that it contained no stipulation that plaintiffs would furnish to defendants any shoes to enable them to carry on their business, and, this being so, an error was committed in enforcing the terms of the agreement. A clause of the contract reads as follows:
“That, whereas, said second parties” (defendants) “desire to obtain goods from time to time to enable them to carry a suitable stock in their said place of business, for which they are unable to pay cash or furnish sufficient security to obtain said goods on credit; and first parties” (plaintiffs) “agree to furnish, subject, however, to the conditions hereinafter set forth, a reasonable quantity of goods to second parties to enable them to carry on their said retail shoe business.”
The principle contended for is without merit, for pursuant to the terms of the contract plaintiffs furnished to defendants a stock of shoes to enable them to conduct their business, and, having done so, plaintiffs complied with the express terms of the agreement.
It is insisted that the contract stipulated for the payment of a penalty in enforcing which an error was committed. The clause thus referred to is as follows:
“If any of said goods shall be taken possession of by first parties, as provided by this agreement, after having been in possession of second parties ninety (90) days or longer, or if any of said goods shall be returned by second parties after having been in their possession for a period of ninety (90) days or longer, second parties hereby agree to pay to first parties twenty (20) per cent of the invoice price of said goods as agreed and liquidated damages sustained by first parties on account of the deterioration in value of said goods while in possession of second parties and other loss sustained by first parties on account of the delivery by them to second parties of said goods.”
*5128. Compensation and not penalty affords the measure usually employed to determine the amount of damages to which a party is entitled by reason of a failure of the adverse party to keep or perform the terms of his agreement. The intention of the parties in this respect is controlling, however, when it satisfactorily appears that when a written contract was effected they anticipated the possible injury and fixed upon a just and reasonable sum of money as applicable to the entire consequence that might arise from a breach of the agreement, in which case the damages thus determined upon are recoverable. Wilhelm v. times, 21 Or. 194 (27 Pac. 1053: 14 L. R. A. 297) ; Pengra v. Wheeler, 24 Or. 532 (34 Pac. 354: 21 L. R. A. 726) ; Dose v. Tooze, 37 Or. 13 (60 Pac. 380) ; Salem v. Anson, 40 Or. 339 (67 Pac. 190: 56 L. R. A. 169: 91 Am. St. Rep. 485) ; Hull v. Angus, 60 Or. 95 (118 Pac. 284).
9. - In the case at bar, though the damages were liquidated, the compensation agreed upon was just and reasonable, for the testimony fully supports a finding made by the trial court to the effect that the shoes which had been in defendants’ possession more than 90 days had during that time deteriorated in value to an amount exceeding $1,000. As a conclusion of law based on that finding, it was determined that plaintiffs were entitled to recover $802.89, with interest thereon from July 11, 1910, as the sum demanded. The amount awarded is less than the damages sustained, and, this being so, the stipulation in the contract cannot be construed as a penalty.
Other alleged errors are assigned; but, believing them unimportant, the judgment is affirmed. Affirmed.