delivered the opinion of the court:
In late 1942 and early 1943 the plaintiff purchased seven ships from the United States Maritime Commission.1 These ships were chartered by the United States for the duration of World War II and were returned to the plaintiff thereafter. In the immediate postwar period, ship prices declined markedly. This was the natural consequence of reduced peacetime shipping needs.2 Congress responded to the disintegrating price situation with the Merchant Ship Sales Act of 1946, ch. 82, 60 Stat. 41, as amended, 50 U.S.C. App. §§ 1735-1746 (1952 Ed.). The broad purpose of this legislation was to “foster the development and encourage the maintenance of * * * a merchant marine [to serve effectively in time of peace or war].” Section 2(b), Merchant Ship Sales Act, supra, 50 U.S.C. App. § 1735(b).3 To effectuate this purpose, section 9 of the Act entitled those who had purchased ships from the United States during the war to apply for an adjustment of the wartime selling price, “such adjustment * * * [to be made] by treating the vessel as if it were being sold to the applicant on the date of the enactment of this Act [March 8, 1946], and not before that time.” 50 U.S.C. App. § 1742(b). For plaintiff this meant a substantial refund of the sales prices of the seven ships it had bought in 1942 and 1943.
Plaintiff’s refund was not immediately forthcoming, however. It took six years at the administrative level to arrive at a so-called “section 9 agreement” which entitled plaintiff to a total refund of $1,809,536.53 for the seven ships. Under *499this agreement of January 25, 1952, the total refund was credited against the $2,340,898.50 mortgage indebtedness on the three ships that were mortgaged to the United States. Because the Maritime Administrator made this credit as of March 8, 1946, plaintiff became entitled to an additional credit in the amount of the interest it had paid between March 8, 1946 and February 15, 1952 4 on so much of the mortgage indebtedness as was cancelled. It is important to note that plaintiff’s interest credit was $227,790.21 greater than it would have been if only the section 9 refunds on the three mortgaged ships had been applied against the three mortgages as of March 8, 1946.5 In other words, plaintiff bought seven ships at different times and mortgaged three to the Government. The Merchant Ship Sales Act established March 8,1946 as the date of the hypothetical sale of the seven ships. The Maritime Administrator interpreted this and the section 9 agreement with plaintiff as a direction to look at the sale of the seven ships as one transaction. Accordingly, he looked to the hypothetical sale date and applied the aggregate of the refunds on the seven ships against the mortgage indebtedness on the three ships.
*500In 1956, plaintiff filed, a petition in this court which alleged that the Maritime Administrator had misinterpreted section 9 and had not treated the “desirable features” adjustments on the seven ships properly. Ct. Cl. No. 118-56, filed March 8, 1956. That petition was consolidated with the petition in Ct. Cl. No. 116-55 and plaintiff moved for summary judgment. On April 7, 1961, we held that plaintiff was entitled to recover. Moore-McCormack Lines, Inc. v. United States, 153 Ct. Cl. 213, 288 F. 2d 898 (1961). Thereafter, on June 5, 1981, defendant moved for leave to file a second amended answer. Part of the amended answer was a counterclaim for about $230,000 alleging that the Maritime Administrator had erroneously retroactively applied the section 9 adjustment on the four non-mortgaged ships against the mortgages on the three mortgaged ships, thereby entitling plaintiff to an excessive interest refund. We denied this motion by order, without opinion, on June 19, 1961. After proceedings before a Trial Commissioner under Eule 38(c) (the present Eule 47(c)), plaintiff and the Government settled the amount of the recovery. They formalized this agreement in a “Stipulation of Dismissal” filed on August 10, 1962, which provided that the “action be * * * dismissed with prejudice, except that it is without prejudice to the rights, if any, of the United States to assert the claim set forth in its third proposed counterclaim, leave to file which was denied by the Court’s order of June 19, 1961.”
The petition in the present case was filed on August 24, 1962. It asserted a claim for income taxes allegedly overpaid in 1946. The claim was based on the depreciation deduction for the seven ships involved in Ct. Cl. No. 118-56. In an amended answer, defendant asserted the same counterclaim it had asked leave to file in the prior litigation. Plaintiff moved for summary judgment on the tax claim; we deferred decision on this motion to await final action of the Supreme Court in Waterman Steamship Corp. v. United States, 381 U.S. 252 (decided May 17, 1965), rehearing denied, 382 U.S. 873 (October 11, 1965). In an order issued *501November 8, 1965, we held that plaintiff’s tax claim was governed by Waterman, so the petition should be dismissed. We withheld entry of judgment, however, pending disposition of the cross-motions on defendant’s counterclaim. We now dispose of these motions and hold that plaintiff’s motion for summary judgment on the counterclaim should be granted.
Plaintiff argues that both the Merchant Ship Sales Act and the agreement between the parties require the retroactive application of the section 9 price adjustment on the seven ships against the mortgage indebtedness on the three mortgaged ships. Defendant strenuously urges the contrary. We offer no opinion on the merits of this dispute because we are persuaded by plaintiff’s second argument that the counterclaim was a compulsory counterclaim in the prior litigation.
In the Federal courts, the compulsory counterclaim rule is court-made. Section 2071 of 28 U.S.C. (1964 Ed.) gives inferior courts a broad discretion to “prescribe rules for the conduct of their business,” all such rules to be consistent with acts of Congress and rules established by the Supreme Court. Section 2072 authorizes the Supreme Court to prescribe rules of civil procedure for the District Courts. Under this authorization, the Court in 1938 promulgated the Federal Pules of Civil Procedure, Pule 13(a) of which provided for compulsory counterclaims. 28 U.S.C. App. pp. 6094-6095 (1964 Ed.). This rule was substantially the same as the former Equity Pule 30, and like the prior rule spoke in positive terms — i.e., “[a] pleading shall state as a counterclaim * * The Advisory Committee on the Pules noted that “if the action proceeds to judgment without the interposition of a counterclaim as required by subdivision (a) of this rule, the counterclaim is barred.” 28 U.S.C. App. p. 6095. In this manner, the rule is enforced. See American Mills Co. v. American Surety Co., 260 U.S. 360 (1922). Our rules are predicated on the District Court rules. Thus, our prior *502Rule 17 (a) (now Rule 21(a), 28 U.8.C. App. p. 6213 (1964 Ed.)) was substantially the same as Rule 13(a).6
In United States v. Eastport Steamship Corp., 255 F. 2d 795 (2d Cir. 1958), the Second Circuit had occasion to consider the applicability of our Rule 17 (a). There, the government sued the Eastport Steamship Corporation in the Southern District of New York to recover charter hire under a contract. 142 F. Supp. 375 (1956). As one of its defenses, Eastport asserted that the claim was barred because it should have been pleaded as a counterclaim in a prior action in the Court of Claims.7 The District Court agreed, and the Second Circuit affirmed, the latter holding that the Government’s claim was a compulsory counterclaim to Eastport’s claim in the prior litigation. The Eastport opinion demonstrates that the theory behind the compulsory counterclaim rule is closely akin to that behind the doctrines of res judicata and collateral estoppel. 255 F. 2d, at 805. See 22 A.L.R. 2d 621, 627-637; 3 Moore, Federal Practice ¶¶13.12,13.13 (1964). By requiring a defendant to present in one proceeding any mature claim arising out of “the transaction or occurrence that is the subject matter of the petition,” piecemeal litigation and multiplicity of suits can be prevented. This is little *503different from saying that a judgment should be final not only as to all issues that were raised, but also as to all that should have been raised.8
The opinion is most instructive in its discussion of the dimensions of a cause of action. It compares our Rule 17(a) with Rule 13 (a) of the Federal Rules, noting that both look to “transaction or occurrence,” and discusses some of the authorities that have given meaning to these terms. For the Second Circuit, at least, the Eastport opinion gives notice that the “transaction or occurrence” test will be applied broadly, so that an absolute identity of factual background for the two claims will not be required; a logical relationship will suffice. 255 F. 2d, at 804. See Moore v. N.Y. Cotton Exchange, 270 U.S. 593, 609-610 (1926); United Artists Corp. v. Masterpiece Productions, Inc., 221 F. 2d 213, 216 (2d Cir. 1955). We agree with the Second Circuit that our compulsory counterclaim rule uses the same approach as Rule 13(a) and that the approach is flexible. We emphasize, however, that there is no automatic test to gauge whether a claim should be barred for failure to assert it in a prior ¡action. In each case, inquiry will have to be directed to the particular “transaction or occurrence” and to the policy of the compulsory counterclaim rule. The policy inquiry is particularly important, because the rule is a court-made rule designed to promote the effective administration of justice. See Rule 21(e).
In the present case, we have no difficulty applying the rule. The counterclaim alleges that the Maritime Administrator erroneously applied the section 9 refund to retroactively reduce ship mortgages and interest. The claim in the prior action related to the section 9 agreement’s treatment of the “desirable features.” The section 9 agreement is the “transaction or occurrence” common to both claims. The policy of the compulsory counterclaim rule is carried out by barring defendant’s claim now. The proper time for resolving all questions relating to the section 9 agreement was in 1961. Defendant did move to file the present counterclaim in the *504prior action, but waited until the 60-day post judgment period. We denied that motion without opinion. Now defendant seizes upon the August 10, 1962 stipulation reserving to it “the rights, if any, * * * to assert the claim set forth in its third proposed counterclaim.” [Emphasis added.] The argument is that “if any” refers to the merits of the claim and not just the right to be heard — i.e., that the Government gave up certain things in the stipulation in exchange for the right to assert the merits of the claim later, whatever they might be. Plaintiff, on the other hand, argues that no right was reserved by the stipulation. We are of the opinion that “if any” only means that the “Stipulation of Dismissal” deferred the resolution of all issues raised by defendant’s claim, and we are free now to decide whether the claim was a compulsory counterclaim in the prior action. Defendant argues in the alternative that Rule 21(e), allowing a compulsory counterclaim to be asserted when “justice requires,” is applicable. The point is made that we allowed defendant’s motion to assert the counterclaim on June 2,1964, presumably on the theory that Rule 21 (e) applied. The answer to this argument is that the considerations behind allowing a motion to assert a claim can be very different from the considerations behind deciding whether a claim should be barred as a compulsory counterclaim in summary judgment proceedings.
The plaintiff is not entitled to recover and its petition is dismissed. Plaintiff’s motion for summary judgment on defendant’s first counterclaim is granted, and defendant’s first counterclaim is dismissed. Defendant’s cross-motion for summary judgment on its first counterclaim is denied.
The united States Maritime Commission administered the Merchant Ship Sales Act of 1946, ch. 82, 60 Stat. 41, as amended, 50 U.S.C. App. §§ 1735-1746 (1952 Ed.), until May 24, 1950 when its functions were transferred to the Department of Commerce, Federal Maritime Board, pursuant to Reorganization Plan No. 21 of 1950, 64 Stat. 1273.
At the end of the war, the American merchant marine totalled about 58 million dead-weight tons. In June 1945, it was estimated that postwar shipping needs would be in the range of 15 million tons. H. Rep. No. 831, 79th Cong., 2d Sess. (1945).
For a full discussion of the need for legislation, see the House Report cited in n. 2, supra.
The date on which all credits were completed.
Following is the allocation of the section 9 credits to the outstanding mortgage indebtedness:
Vessel Acquisition date Adjusted mortgages Mar. 8,1946 Section 9 credits
MORMACHAWIC.. Dec. 14,1942 $272,591.24
MORMACWREN.. Dec. 26,1942 278,894.97
MORMACTERN— Dec. 29,1942 287,318.02
MORMACREED— Eeb. 9,1943 242,993.94
Subtotal, 4 non-mortgaged vessels. 1,081,798.17
MORMACWAVE.. Eeb. 13,1943 $960,547.50 216,858.85
MORMACDOVE-Dec. 31,1942 691,469.25 281,601.90
MORMACLARK-Eeb. 4,1943 688,881.75 229,277.61
Subtotal, 3 mortgaged vessels.. 2,340,898.50 727,738.36
Total, 7 vessels__ 2,340,898.50 1,809,536.53
The text of Rule 21(a) is as follows :
“(a) Compulsory Counterclaim: The answer shall state as a counterclaim any claim which, at the time of serving the answer, the defendant has against any plaintiff, if it arises out of the transaction or occurrence that is the subject matter of the petition and does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction: Provided, That such a claim need not be so stated if at the time the action was commenced the claim was the subject of another pending action.”
During the period that Ct. Cl. No. 118-56 was before us, Court of Claims Rule 17(a) was the compulsory counterclaim rule. Rule 17(a) wag the same except that it had an additional proviso as follows: “* * * and except that in any case, where the hearing in the first instance is limited to the issues of fact and law relating to the right of plaintiff to recover, defendant may plead such a counterclaim within 60 days after the Court shall have rendered judgment determining that plaintiff has a right to recover.” No suggestion has been made by defendant that this proviso excepted it from the requirement of filing the counterclaim with the answer in the prior case.
Eastport Steamship Corporation v. United States, 128 Ct. Cl. 778 (1954) (ordering judgment for plaintiff on stipulation of the parties) ; 131 Ct. Cl. 210, 130 F. Supp. 333 (1955) (On defendant’s motion to dismiss plaintiff’s claim for the amount of the judgment withheld by defendant as an offset) ; 135 Ct. Cl. 175, 140 F. Supp. 773 (1956) (On plaintiff’s motion to strike defendant’s answer and for other relief). See 255 F. 2d 795, 798 for a full discussion of the proceedings in this court.
See Court of Claims Rule 21(e) (formerly 17(e)) and Rule 13(f) of the ¡Federal Rules for the effect of mitigating circumstances.