
372 So.2d 313 (1979)
Ex parte Gary L. MARCRUM, Sr.
In re NELSON WEAVER REALTY COMPANY, INC., a corporation, d/b/a The Mayer Company
v.
Gary L. MARCRUM, Sr. and the Crest Company.
78-237.
Supreme Court of Alabama.
June 22, 1979.
*314 James L. Shores, Jr., Birmingham, for petitioner.
S. R. Starnes and L. Graves Stiff, III, Birmingham, for respondents.
ALMON, Justice.
This is an original petition for a writ of mandamus which raises the question of the timeliness of a jury demand.
The petitioner, Marcrum, is one of the defendants in a suit filed in the Circuit Court of Jefferson County. In that suit, the plaintiff, Nelson Weaver Realty Company, Inc., alleged that petitioner has solicited customers or prospective customers of the plaintiff in violation of an employment agreement entered into by the parties on March 18, 1974.
The complaint was filed on June 22, 1978, and sought damages and injunctive relief. It did not contain a jury demand.
The petitioner and other defendants filed an answer to the suit on July 10, 1978. A jury demand was not included in this answer.
On August 14, 1978, petitioner filed a counterclaim against Nelson Weaver Realty Company, alleging the breach of a separate agreement dated September 1, 1976, regarding commissions to be paid to petitioner. This counterclaim, filed thirty-five days after the answer, contained a jury demand of all the issues in the case.
On the 12th day of January, 1979, after denying the injunctive relief, the trial court ordered that:
"The `main case' in this cause shall proceed to trial without a jury. The Counter-Claim as filed by Defendant, Marcrum, is hereby disjoined from this cause and is transferred to the law-side of this Court to be tried to a jury."
The petitioner contends that the trial court erred in transferring the counterclaim and seeks, through this mandamus proceeding, to have the entire case, including the claims presented in the original complaint, tried to a jury. It is the respondent's position that the petitioner waived the right to a jury trial on the issues presented by the original complaint by failing to make a timely demand therefor. The respondent further contends that the counterclaim filed by the petitioner does not operate to revive the right to a jury trial on the issues raised by the complaint and therefore, the transfer order of the trial court was proper.
Rule 38(a), ARCP, preserves inviolate the right to a trial by jury and 38(b) provides the means by which a litigant invokes that right. Moreover, 38(d) provides in clear and unambiguous terms that "[t]he failure of a party to serve a demand as required by this rule ... constitutes a waiver by him of trial by jury."
We agree with the statement in the respondent's brief:
"Inasmuch as petitioner Marcrum did not file his jury demand as to the issues of the complaint until after 30 days from the date of the answer (the last pleading directed to the issues of the complaint), it is clear that the right to jury trial as to those issues has been waived."
There is no indication in the petition for mandamus that the petitioner has attempted to avail himself of the saving provision embodied in Rule 39(b), ARCP. That rule provides that where a party fails to invoke the right to a trial by jury, the court, in its discretion upon motion may order a trial by jury of any or all issues.
*315 We do not believe that the trial court abused its discretion in ordering that the counterclaim be tried separately.[1] None of the views expressed herein should be construed as establishing an immutable principle that the conjunction of non-jury issues and issues triable to a jury compels a separate trial. Both Mobley v. Moore, 350 So.2d 414 (Ala.1977), and the Committee Comments to Rule 42, ARCP, expressly reject that conclusion.
The fact that a jury trial is demanded for one or more claims, by the very terms of Rule 42, ARCP, is a factor that the trial judge must consider in determining whether to order separate trials. Moreover, the Committee Comments indicate that the trial court is vested with a "virtually unlimited freedom" to order separate trials. The merger of law and equity, Rule 2, ARCP, and the consequent possibility of the intermingling of issues to be tried by the jury with issues to be tried by the court are cited as the reasons for Rule 42, ARCP. Therefore, absent an abuse of discretion, the trial court will be allowed to "shape the order of trial" through the provisions of Rule 42, ARCP.
It is not necessary for our decision to characterize the counterclaim in this case as either permissive or compulsory, Rule 13, ARCP, but we do note that the issue presented by the counterclaim appears to concern the parties' obligations under a contract separate and independent from the employment contract made the basis of the original complaint. We are not persuaded that the order transferring the counterclaim constituted an abuse of discretion.
Accordingly, the petition for a writ of mandamus is denied.
PETITION DENIED.
TORBERT, C. J., and BLOODWORTH, FAULKNER and EMBRY, JJ., concur.
NOTES
[1]  It is not clear from the record whether the trial court severed the counterclaim, Rule 21, ARCP, or ordered separate trials, Rule 42, ARCP. See Key v. Robert M. Duke Ins. Agency, 340 So.2d 781 (Ala.1976). For the purpose of deciding this case, the legal effect of the trial court's transfer order is immaterial.
