
290 S.C. 299 (1986)
350 S.E.2d 191
C & S REAL ESTATE SERVICES, INC., Respondent
v.
Patricia Ann MASSENGALE, and Blazer Financial Services, Inc., of whom Patricia Anne Massengale is Appellant.
Supreme Court of South Carolina.
October 22, 1986.
*300 Kevin Barth and Frederick K. Jones, Florence, for appellant.
Finley B. Clarke, Florence, for respondent.
October 22, 1986.

ORDER
Appellant has appealed an order denying her a jury trial on all but one of six counterclaims she asserted in this mortgage foreclosure. Respondent now moves to dismiss the appeal on the ground the order is not immediately appealable. We grant the motion to dismiss.
An order denying a party a jury trial is not immediately appealable unless it deprives him of a mode of trial to which he is entitled as a matter of right. See Williford v. Downs, 265 S.C. 319, 218 S.E. (2d) 242 (1975); Alston v. Limehouse, 61 S.C. 1, 39 S.E. 192 (1901). We must determine whether appellant had the right to a jury trial on any of the five counterclaims which were ordered tried without a jury.
The trial judge held that two of the counterclaims were equitable in nature. Appellants clearly had no right to a jury trial on these claims. See Williford v. Downs, supra; Allen Bros. Milling Co. v. Adams, 233 S.C. 416, 105 S.E. (2d) 257 (1958).
The trial judge held the remaining counterclaims were legal in nature. He found, however, that three of these claims were permissive, that three of these claims were permissive counterclaims under Rule 13(b), SCRCP, and appellant had waived a trial by jury when she asserted them in an equitable action. The judge ordered a jury trial only of the legal compulsory counterclaim.
Prior to the adoption of the South Carolina Rules of Civil Procedure, a defendant in a mortgage foreclosure, an action in equity, had no right to a jury trial on a legal counterclaim. *301 See, e.g., Barnwell Production Credit Ass'n v. Hartzog, 231 S.C. 340, 98 S.E. (2d) 835 (1957); Welborn v. Cobb, 92 S.C. 384, 75 S.E. 691 (1912). Such a counterclaim could be asserted in the foreclosure action if it arose out of the same transaction; however, the counterclaim was not mandatory.
Rule 13(a), SCRCP, now requires a defendant to plead as a counterclaim any claim arising out of the transaction or occurrence that is the subject matter of the plaintiff's claim. He is entitled to a jury trial on these compulsory counterclaim if legal in nature even though asserted in an equitable action. See, e.g., Amoco Oil Co. v. Torcomian, 722 F. (2d) 1099 (3d Cir.1983); Lisle Mills, Inc. v. Arkay Infants Wear, Inc., 90 F. Supp. 676 (E.D.N.Y. 1950); Hightower v. Bigoney, 156 So. (2d) 501 (Fla. 1963). The trial judge properly held appellant was entitled to a jury on the compulsory counterclaim at law.
Rule 13(b), SCRCP, permits a defendant to plead as a counterclaim any claim not arising out of the transaction or occurrence that is the subject matter of the plaintiff's claim. When a defendant asserts these permissive counterclaims which are legal in nature, he waives the right to a jury trial on these issues. John D. Hollingsworth on Wheels, Inc. v. Arkon Corp., 273 S.C. 461, 257 S.E. (2d) 165 (1979); Crewe v. Blackmon, 289 S.C. 229, 345 S.E. (2d) 754 (Ct. App. 1986). Appellant therefore had no right to a trial by jury on her permissive counterclaims.
The order under appeal did not deprive appellant of a mode of trial to which she was entitled as a matter of right. Accordingly, the motion to dismiss this appeal is granted.
In view of the change in practice brought about by Rule 13, we take this opportunity to summarize the proper analysis for determining the trial of issues raised by counterclaim and to set out the procedure to be followed when issues are to be tried before a jury.
(1) If both the complaint and the counterclaim are in equity, the entire matter is triable by the court.
(2) If both are at law, the issues are triable by a jury.
(3) If the complaint is equitable and the counterclaim is *302 legal and permissive, the defendant waives his right to a jury trial.
(4) If the complaint is equitable and the counterclaim legal and compulsory, the defendant has the right to a jury trial on the counterclaim. In that case, the proper procedure is as follows:
(a) The trial judge should, pursuant to Rule 42(b), order separate trials of the legal and equitable claims.
(b) The judge must then determine which issues are to be tried first.
(c) If there are factual issues common to both claims, absent the "most imperative circumstances," Beacon Theatres, Inc. v. Westover, 359 U.S. 500, 79 S.Ct. 948, 3 L.Ed. (2d) 988 (1959), the "at law" claim must be tried first. The clerk of court shall immediately place the "at law" action at the top of the trial roster.
(d) If there are no common factual issues, it is within the trial judge's discretion which claim will be tried first.
