
112 Ill. App.3d 658 (1983)
445 N.E.2d 837
DALE BENCKENDORF, Plaintiff,
v.
BURLINGTON NORTHERN RAILROAD et al., Defendants.  (Burlington Northern Railroad, Counterplaintiff and Counterdefendant  Appellant
v.
Dennis M. Lee, Counterdefendant and Counterplaintiff-Appellee.)
No. 82-505.
Illinois Appellate Court  Second District.
Opinion filed February 2, 1983.
Rehearing denied March 10, 1983.
*659 Kenneth J. Wysoglad, Thomas J. Knapp, and Michael L. Sazdanoff, all of Burlington Northern Railroad Co., of Chicago, for appellant.
No appearance for appellee.
Order affirmed.
JUSTICE NASH delivered the opinion of the court:
In this personal injury action we allowed an interlocutory appeal by permission pursuant to Supreme Court Rule 308 (87 Ill.2d R. 308(a)) from an order of the circuit court denying a motion by defendant-counterplaintiff-counterdefendant Burlington Northern Railroad to strike the counterclaim of defendant-counterplaintiff-counterdefendant *660 Dennis M. Lee. The trial court certified the following question for resolution:
"Whether Ill. Rev. Stat., ch. 83, sec. 15 and sec. 18 bars defendant Lee's counterclaim against defendant, Burlington Northern, which counterclaim was filed, without leave of court, before defendant's [sic] Lee answer was filed."
We answer in the negative and, accordingly, affirm the order of the circuit court.
The underlying action was commenced on September 29, 1981, when plaintiff Dale Benckendorf filed a two-count complaint against defendants Burlington and Lee seeking damages for personal injuries sustained on December 1, 1979, when a Burlington train collided with an auto driven by Lee in which Benckendorf was a passenger. On November 6, 1981, Burlington filed its answer to the complaint and a counterclaim against Lee, in which it seeks contribution due to Lee's alleged negligent operation of the auto.
On November 25, 1981, without seeking leave of court, Lee filed a counterclaim against Burlington (count 1) and Frederick T. Reinschmidt (count 2), its engineer, in which Lee sought damages for personal injuries he sustained in the December 1, 1979, collision. Subsequently, on December 3, 1981, through other attorneys, Lee filed his answer to plaintiff's complaint denying any negligence on his part caused the accident.
On January 25, 1982, Burlington moved to strike and dismiss count 1 of Lee's counterclaim directed against it, asserting Lee had filed his counterclaim prior to filing his answer, in violation of section 38 of the Civil Practice Act (Ill. Rev. stat. 1981, ch. 110, par. 38), now section 2-608 of the Code of Civil Procedure (Ill. Rev. Stat. 1981, ch. 110, par. 2-608), and that the counterclaim was barred by the statute of limitations (Ill. Rev. Stat. 1981, ch. 83, pars. 15, 18), now sections 13-202, 13-207 of the Code of Civil Procedure (Ill. Rev. Stat. 1981, ch. 110, pars. 13-202, 13-207).
After arguments, the trial court made findings that Lee's counterclaim was timely filed within the statute of limitations and that Lee's answer by his subsequent attorney was filed after the 30-day response period. The court denied Burlington's motion to strike the counterclaim and certified the question presented in this appeal.
Lee has not seen fit to assist this court with a brief, and we will review the merits of the issues presented under the standards set forth in First Capitol Mortgage Corp. v. Talandis Construction Corp. (1976), 63 Ill.2d 128, 133, 345 N.E.2d 493.
Burlington contends that Lee's counterclaim for personal injuries *661 was not filed within the two-year limitation period governing such actions (Ill. Rev. Stat. 1981, ch. 83, par. 15), now section 13-202 of the Code of Civil Procedure (Ill. Rev. Stat. 1981, ch. 110, par. 13-202), and should have been dismissed by the trial court. (See, e.g. Griffith v. Pincham (1978), 67 Ill. App.3d 316, 384 N.E.2d 870, appeal denied (1979), 74 Ill.2d 586.) It argues that although the counterclaim filed November 25, 1981, was in fact filed within two years of the December 1, 1979, accident, that was not properly done as it was filed prior to, rather than a part of, Lee's answer to plaintiff's complaint. Burlington also asserts that even if the counterclaim is considered to be properly filed as of December 3 when Lee filed his answer, it nevertheless falls then outside the two-year limitation period and it is not "saved" by the provisions of section 17 of the Limitations Act (Ill. Rev. Stat. 1981, ch. 83, par. 18), now section 13-207 of the Code of Civil Procedure (Ill. Rev. Stat. 1981, ch. 110, par. 13-207).
 1 Section 32 of the Civil Practice Act (Ill. Rev. Stat. 1981, ch. 110, par. 32), now section 2-602 of the Code of Civil Procedure (Ill. Rev. Stat. 1981, ch. 110, par. 2-602) provides that a defendant's first pleading shall be designated an answer. Section 38 of the Act allows a defendant to file a counterclaim against a codefendant and provides that it shall be a part of the answer and designated as a counterclaim (Ill. Rev. Stat. 1981, ch. 110, par. 38, now ch. 110, par. 2-608). While a defendant is not required to immediately assert his rights by way of a counterclaim (Miller v. Bank of Pecatonica (1980), 83 Ill. App.3d 424, 427, 403 N.E.2d 1262), Lee chose to do so here but did not follow the procedures set forth in the Act. His original pleading was the counterclaim against codefendant Burlington and it was not filed with or as a part of Lee's answer to plaintiff's complaint as should be done. Hutchinson v. Brotman-Sherman Theatres, Inc. (1981), 94 Ill. App.3d 1066, 1073, 419 N.E.2d 530; Trustees of Schools v. Schroeder (1972), 8 Ill. App.3d 122, 124, 289 N.E.2d 247; cert denied (1973), 414 U.S. 832, 38 L.Ed.2d 67, 94 S.Ct. 166.
 2 It has been held, however that the trial court has discretion to grant a defendant leave to file a counterclaim subsequent to the filing of an answer. (Trustees of Schools v. Schroeder (1972), 8 Ill. App.3d 122, 124, 289 N.E.2d 247, cert. denied (1973), 414 U.S. 832, 38 L.Ed.2d 67, 94 S.Ct. 166; People ex rel. Ames v. Marx (1939), 299 Ill. App. 284, 288, 20 N.E.2d 103, 30 Ill. L. & Prac. Pleading sec. 75 (1957).) We see no compelling reason why the court should not also be permitted to exercise its judicial discretion in circumstances, as here, where defendant irregularly files his counterclaim before his answer *662 or, stated differently, files his answer after his counterclaim. See Winemiller v. Mossberger (1933), 355 Ill. 145, 154, 188 N.E. 903.
Here, Lee's answer to plaintiff's complaint was filed eight days after filing his counterclaim against codefendant Burlington. Both pleadings were of record when Burlington sought to dismiss the counterclaim and it has not suggested that it was in any way prejudiced by Lee's failure to file his answer and counterclaim at the same time (cf., McGrath Heating & Air Conditioning Co. v. Gustafson (1976), 38 Ill. App.3d 465, 467, 348 N.E.2d 223; Greenlee Brothers & Co. v. Rockford Chair & Furniture Co. (1969), 107 Ill. App.2d 326, 333, 246 N.E.2d 64). Although it is not shown in the record that Lee requested leave of court to permit him to file his counterclaim prior to answering, the trial court did allow the counterclaim to withstand Burlington's motion to strike it as prematurely filed. It appears that the court did exercise its discretion in favor of allowing Lee's counterclaim to stand notwithstanding the procedural pleading defect. The Civil Practice Act provides that it should be construed liberally, rather than strictly, so that controversies may be determined expeditiously and finally according to the substantive rights of the parties and with a view to doing substantial justice between them. (Ill. Rev. Stat. 1981, ch. 110, pars. 4, 33, now Ill. Rev. Stat. 1981, ch. 110, pars. 1-106, 2-603.) We conclude the trial court did not abuse its discretion, in these circumstances, by allowing Lee's counterclaim to stand and denying Burlington's motion to strike it.
Burlington contends further that if Lee's counterclaim should be considered to have been filed on December 3, 1981, with his answer filed on that day, the cause of action was not commenced within the requisite two years of the December 1, 1979, accident and is barred as untimely.
 3, 4 While section 38 of the Civil Practice Act does not require that a counterclaim be filed with the answer, it also recognizes the differences in the nature of the two pleadings by indicating the counterclaim "shall be complete in itself" (Ill. Rev. Stat. 1981, ch. 110, par. 38, now Ill. Rev. Stat. 1981, ch. 110, par. 2-608). A counterclaim differs from an answer or affirmative defense. The former is a cause of action which seeks affirmative relief, whereas an answer or affirmative defense merely attempts to defeat a plaintiff's cause of action. (Peoria Housing Authority v. Sanders (1973), 54 Ill.2d 478, 484-85, 298 N.E.2d 173, 175-77 (dissent); Wilson v. Tromly (1949), 404 Ill. 307, 309-10, 89 N.E.2d 22.) In the present case, the only time Lee put into motion the instruments of the court to recover money damages from Burlington was with the filing of his counterclaim, not with his *663 answer, under which he could collect nothing (see 404 Ill. 307, 314, 89 N.E.2d 22, 26). Lee's action against Burlington commenced with his counterclaim; as it was filed on November 25, 1981, less than two years after the occurrence of the train-auto collision, the cause of action was brought within the applicable statute of limitations.
In any event, even should it be considered that Lee's counterclaim was filed as of December 3, 1981, under section 17 of the Limitations Act (Ill. Rev. Stat. 1981, ch. 83, par. 18), now section 13-207 of the Code of Civil Procedure (Ill. Rev. Stat. 1981, ch. 110, par. 13-207), his cause of action would not be barred by the two-year limitation period.
Section 17 of the Limitations Act "saves" otherwise barred claims by providing that:
"A defendant may plead a set-off or counter claim barred by the statute of limitation, while held and owned by him, to any action, the cause of which was owned by the plaintiff or person under whom he claims, before such set-off or counter claim was so barred, and not otherwise * * *." Ill. Rev. Stat. 1981, ch. 83, par. 18.
 5 Burlington argues that section 17 applies only to actions between a plaintiff and defendant and does not apply where a defendant has filed a counterclaim against another defendant, citing Dignan v. Midas-International Corp. (1978), 65 Ill. App.3d 188, 192, 382 N.E.2d 559, and Eddy v. Yellow Cab Co. (N.D. Ill. 1977), 434 F. Supp. 447, 448. In both Dignan and Eddy, however, the parties against whom counterclaims had been filed were passive codefendants who had not, as in this case, brought actions against the counterclaimants. Here, when Burlington filed its counterclaim against Lee for contribution based upon Lee's alleged negligent driving of the auto, Burlington became a plaintiff vis a vis Lee. In our view, Dignan and Lee must be distinguished, and Lee's counterclaim, even if considered filed two days after expiration of the statute of limitations, would be "saved" by the terms of section 17.
Accordingly, we resolve the issue of law presented in the negative and affirm the order of the trial court denying Burlington's motion to strike and dismiss Lee's counterclaim against it.
Affirmed.
HOPF and VAN DEUSEN, JJ., concur.
