
351 S.C. 56 (2002)
566 S.E.2d 863
The BEACH COMPANY, Respondent,
v.
TWILLMAN, LTD., d/b/a The Washington Pen Company, Appellant.
No. 3532.
Court of Appeals of South Carolina.
Submitted June 3, 2002.
Decided July 8, 2002.
*59 Gregg Meyers, Charleston, for appellant.
Bruce A. Berlinsky, of Pritchard & Berlinsky, Charleston, for respondent.
CURETON, J.
The Beach Company (Beach) initiated this breach of contract action against Twillman, Ltd. (Twillman). Twillman answered, requesting a jury trial and asserting a counterclaim. The trial court granted Beach's motion to strike the counterclaim and request for a jury trial. Twillman appeals. We affirm in part and reverse in part.


*60 FACTS
Twillman, as tenant doing business as the Washington Pen Company, and Beach, as landlord, entered into a five-year lease of a storefront located at 211 King Street in Charleston, South Carolina. Twillman has not paid all the rent due under the terms of the contract and is in default of the lease absent a justified excuse to the contrary. Section 27.16 of the "Miscellaneous Provisions" section of the lease, entitled "Waiver of Counterclaim" provides:
Tenant waives any and all right to trial by jury or to interpose any counterclaim in any summary proceeding for eviction or nonpayment of Rent. Any and all claims or `counterclaims' that may be asserted by Tenant shall only be made the subject of a separate action. In such separate action, it is agreed that trial by jury shall be waived by both parties.
At a hearing on the motion to strike, Beach argued the waiver provision should control and the court should grant the motion to strike the counterclaim and the request for a jury trial. Twillman argued the lease provision violates South Carolina law governing compulsory counterclaims and jury trials. The trial court concluded:
The Court finds that the lease agreement between the parties is controlling in determining this matter; that the parties have agreed in the lease that there will be no demand for jury trial or any jury trial on any issue relating to eviction or nonpayment of rent; that in a commercial lease setting the parties can make such an agreement and that type of an agreement is not against public policy or contrary to the judicial economy as compared with the right of a party to recover property and rent as may be applicable. The Court would therefore grant the motion of the plaintiff to strike the counterclaim and request for jury trial.
Twillman appeals.

DISCUSSION

Waiver of Compulsory Counterclaim
Twillman argues the trial court erred in granting Beach's motion to strike Twillman's counterclaim. Twillman first asserts its counterclaim is compulsory.
*61 Counterclaims are governed by Rule 13, SCRCP, which provides:
A pleading shall state as a [compulsory] counterclaim any claim which at the time of serving the pleading the pleader has against any opposing party, if it arises out of the transaction or occurrence that is the subject matter of the opposing party's claim and does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction.
Rule 13(a), SCRCP.
"[R]ules of procedure, like statutes, should be given their plain meaning." Valentine v. Davis, 319 S.C. 169, 173, 460 S.E.2d 218, 220 (Ct.App.1995). "By definition, a counterclaim is compulsory only if it arises out of the same transaction or occurrence as the opposing party's claim." First-Citizens Bank & Trust Co. v. Hucks, 305 S.C. 296, 298, 408 S.E.2d 222, 223 (1991). The test for determining if a counterclaim is compulsory is whether there is a "logical relationship" between the claim and the counterclaim. Mullinax v. Bates, 317 S.C. 394, 396, 453 S.E.2d 894, 895 (1995). Whether a counterclaim is logically related to the initial claim depends upon the facts of each case. See Hucks, 305 S.C. at 298, 408 S.E.2d at 223 (finding a logical relationship between a trustee regarding the administration of a trust and a legal counterclaim alleging that the trustee breached a fiduciary duty); N.C. Fed. Sav. & Loan Ass'n v. DAV Corp., 298 S.C. 514, 518-19, 381 S.E.2d 903, 905 (1989) (finding a logical relationship between an action on a note brought by the lender to foreclose and the validity of a purported oral agreement modifying the note alleged by the borrower).
Beach's complaint alleges Twillman is in breach of the lease agreement. Twillman's counterclaim alleges a breach of the same agreement by Beach. As we find these claims are logically related to each other, we agree Twillman's counterclaim is compulsory.
Twillman next argues a compulsory counterclaim must have been pursued in Beach's lawsuit or be forever waived, thus the trial court erred in striking the counterclaim based on the waiver in the lease agreement. We agree.
*62 Rules of procedure "shall be construed to secure the just, speedy, and inexpensive determination of every action." Rule 1, SCRCP. The purpose of Rule 13(a) is "to prevent multiplicity of actions and to achieve resolution in a single lawsuit of all disputes arising out of common matters." S. Constr. Co. v. Pickard, 371 U.S. 57, 60, 83 S.Ct. 108, 9 L.Ed.2d 31 (1962) (interpreting the federal counterpart to South Carolina's Rule 13(a)).
If a compulsory counterclaim is not raised in the first action, a defendant is precluded from asserting the claim in a subsequent action. Crestwood Golf Club, Inc. v. Potter, 328 S.C. 201, 217, 493 S.E.2d 826, 835 (1997). The South Carolina Reporter's Note following Rule 13 states: "[c]ounterclaims arising out of the same transaction or occurrence that is the subject of the action are `compulsory' under Rule 13(a) and are barred by res judicata or estoppel by judgment if not asserted." The Reporter's Note also notes that South Carolina's Rule 13(a) is the same as the federal rule on counterclaims. Accordingly, we may rely on federal law to interpret our Rule 13. See Brown v. Leverette, 291 S.C. 364, 366-67, 353 S.E.2d 697, 698-99 (1987) (utilizing federal law to interpret a state rule that tracked the language of the corresponding federal rule).
When the Federal Rules of Civil Procedure were adopted in 1938, counterclaims were, for the first time, classified as either compulsory or permissive. W.R. Habeeb, Annotation, Failure to Assert Matter as Counterclaim as Precluding Assertion Thereof in Subsequent Action, Under Federal Rules or Similar State Rules or Statutes, 22 A.L.R.2d 621, 624 (1952). In December 1946, effective March 19, 1948, the Rule was amended into language similar to its current language.[1] The *63 purpose of the amendment was "to insure against the `undesirable possibility presented under the original rule whereby a party having a . . . compulsory counterclaim could avoid stating it . . . by bringing an independent action in another court after the commencement of the federal action but before serving his pleading in the federal action.'" Sparrow v. Nerzig, 228 S.C. 277, 283, 89 S.E.2d 718, 721 (1955) (quoting Rule 13, SCRCP, advisory committee's notes on amendments).
Federal Rule 13(a) was amended a second time effective July 1, 1963.[2] It now requires that a compulsory counterclaim be pleaded and adjudicated or all right of action thereon is foreclosed. New Britain Mach. Co. v. Yeo, 358 F.2d 397, 410 (6th Cir.1966). The rule prohibiting a party from asserting a compulsory counterclaim in a subsequent action under Federal Rule 13 is mandatory. Id.
Given the express purpose behind the civil rules of procedure and the mandatory nature of compulsory counterclaims, we find the provision in the lease agreement purporting to waive Twillman's right to assert a compulsory counterclaim in Beach's breach of lease action is unenforceable. See Loader Leasing Corp. v. Kearns, 83 F.R.D. 202, 204 (W.D.Pa. 1979) (finding that a compulsory counterclaim waiver provision is unenforceable in a federal forum); Atl. Coast Line R. Co. v. U.S. Fid. & Guar. Co. 52 F.Supp. 177, 189 (M.D.Ga.1943) (finding a contractual waiver of compulsory counterclaims provision not enforceable under Federal Rule 13 as the rule "prohibits the very thing which the parties contracted to do."). Accordingly, we agree with Twillman the trial court erred in striking its counterclaim based on the waiver provision.

Waiver of Right to Jury Trial
Twillman also argues the waiver of its right to a jury trial was invalid. We disagree.
A party may waive the right to a jury trial by contract. N. Charleston Joint Venture v. Kitchens of Island *64 Fudge Shoppe, Inc., 307 S.C. 533, 535, 416 S.E.2d 637, 638 (1992). Such a waiver must be strictly construed as the right to trial by jury is a substantial right. Id. However, terms in a contract provision must be construed using their plain, ordinary and popular meaning. Fritz-Pontiac-Cadillac-Buick v. Goforth, 312 S.C. 315, 318, 440 S.E.2d 367, 369 (1994).
The waiver provision in the lease plainly provides that in any claim asserted by Twillman, "trial by jury shall be waived by both parties." We find the clause is a valid waiver of Twillman's right to a jury trial.

Severability
Twillman argues even if the right to jury trial was validly waived, the waiver clause cannot be severed from the remainder of Section 27.16, and the unenforceability of the waiver of a compulsory counterclaim renders the waiver of a jury trial likewise unenforceable. We disagree.
An illegal contract is unenforceable. Berkebile v. Outen, 311 S.C. 50, 53 n. 2, 426 S.E.2d 760, 762 n. 2 (1993). "The general rule is that courts will not enforce a contract which is violative of public policy, statutory law, or provisions of the Constitution." Id. Whether an illegal provision in an otherwise valid contract may be severed from the contract is a matter of the intent of the parties. Scruggs v. Quality Elec. Servs., Inc., 282 S.C. 542, 545, 320 S.E.2d 49, 51 (Ct.App.1984).
A contract is entire, and not severable, when by its terms, nature, and purpose it contemplates and intends that each and all of its parts, material provisions, and the consideration are common each to the other and interdependent.
A severable contract is one in its nature and purpose susceptible of division and apportionment, having two or more parts, in respect to matters and things contemplated and embraced by it, not necessarily dependent upon each other, nor is it intended by the parties that they shall be. The entirety or severability of a contract depends primarily upon the intent of the parties rather than upon the divisibility of the subject, although the latter aids in determining the intention.
*65 Columbia Architectural Group, Inc. v. Barker, 274 S.C. 639, 641, 266 S.E.2d 428, 429 (1980) (quoting Packard & Field v. Byrd, 73 S.C. 1, 6, 51 S.E. 678, 679 (1905)).
Reading Section 27.16 with or without the reference to the counterclaim provision, Twillman unequivocally "waive[d] any and all right to trial by jury." Twillman's right to a jury trial and its right to assert a compulsory counterclaim are separate and distinct rights. We find the portion of Section 27.16 in the lease agreement between Twillman and Beach that is adverse to Rule 13(a), SCRCP, regarding compulsory counterclaims, is severable from the remaining portion of the lease.

CONCLUSION
For the foregoing reasons, we find Twillman waived its right to a trial by jury but may assert its compulsory counterclaim to Beach's action for breach of the lease agreement. Accordingly, the order on appeal is
AFFIRMED IN PART and REVERSED IN PART.
STILWELL and SHULER, JJ., concur.
NOTES
[1]  Rule 13(a), FRCP, eff. March 19, 1948, reads:

A pleading shall state as a counterclaim any claim which at the time of serving the pleading the pleader has against any opposing party, if it arises out of the transaction or occurrence that is the subject matter of the opposing party's claim and does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction, except 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. Sparrow v. Nerzig, 228 S.C. 277, 283, 89 S.E.2d 718, 721 (1955) (quoting the 1948 version of the federal rule).
[2]  See Habeeb, 22 A.L.R.2d at § 3 (Supp.1996).
