
701 N.E.2d 1126 (1998)
297 Ill. App.3d 778
233 Ill.Dec. 852
Tommie G. BESCO and Debra Lynn Besco, Plaintiffs-Appellants,
v.
HENSLEE, MONEK & HENSLEE, The Estate of Francis Monek, Frank Van Bree, and William E. Davis, Defendants-Appellees.
No. 4-97-0950.
Appellate Court of Illinois, Third District.
June 12, 1998.
Rehearing Denied August 18, 1998.
*1127 Kevin J. Davidson (argued), Bernard & Davidson, Granite City, for Tommie G. Besco.
David R. Sinn, Karen L. Kendall (argued), Lisa A. LaConte, Heyl, Royster, Voelker & Allen, Peoria, for Henslee, Monek & Henslee.
David L. Cunningham, Franklin S. Wallace, Winstein, Kavensky & Wallace, Rock Island, for William E. Davis.
Presiding Justice HOMER delivered the opinion of the court:
Plaintiffs brought suit against their former attorneys for legal malpractice in the handling of plaintiffs' underlying personal injury case. As a sanction for violating a discovery order, the trial court barred plaintiffs from naming any opinion witnesses. Thereafter, the trial court granted summary judgment in favor of the attorneys finding that plaintiffs could not prevail on their claim, as a matter of law, absent opinion testimony on the applicable standard of care. We reverse.

FACTS
Tommie and Debra Lynn Besco filed a complaint for legal malpractice against the law firm of Henslee, Monek and Henslee, attorney Frank VanBree, and the estate of attorney Francis Monek (collectively referred to as "Chicago Counsel"), and attorney William Davis (Davis) based upon their representation of plaintiffs in the underlying personal injury case.
The underlying lawsuit arose from an automobile accident that occurred in Iowa on January 3, 1990. Tommie, an employee of Chicago and Northwestern Transportation Company, was injured when the company van in which he was riding collided with a vehicle driven by Ronald Cousins. In June 1990, plaintiffs retained Chicago Counsel to represent them in a lawsuit to recover for Tommie's injuries. Although the claim against Cousins was based upon common law negligence, jurisdiction was in the Federal District Court for the Southern District of Iowa since a separate claim against Tommie's employer was based upon the Federal Employers' Liability Act (45 U.S.C.A. § 51 et seq. (West 1986)).
The rules of the Federal District Court for the Southern District of Iowa require that attorneys who are not admitted to practice *1128 before that court but who wish to file suit in the district must associate with an attorney who has been admitted to the court's bar. Since Chicago Counsel were not so admitted, they hired Davis as local counsel but did not inform plaintiffs. Chicago Counsel first contacted Davis in late November 1991 and asked him to provide them pleading forms so they could ensure the complaint would comply with local rules. At this time, both Chicago Counsel and Davis acknowledged that the claim against Cousins was subject to a two-year statute of limitations; however, it appears that they never discussed the date upon which it would expire in this particular case.
Davis forwarded the requested forms in mid December; and on December 23, 1991, Chicago Counsel sent Davis the complaint and asked him to review, sign and file it. Davis ultimately filed the complaint on January 30, 1992, which was 27 days past the expiration of the statute of limitations for the action against Cousins. The complaint against Cousins was subsequently dismissed based upon the running of the limitations period. Plaintiffs settled their claim against Tommie's employer for $175,000.
In April 1993, plaintiffs instigated the instant malpractice suit against Chicago Counsel and Davis based upon their failure to file the suit against Cousins in a timely manner.[1] At the case management conference on June 28,1996, the following discovery cut-off dates were set by court order: (1) all written discovery by July 15,1996; (2) depositions of all parties and nonopinion witnesses by September 30; (3) plaintiffs' opinion witnesses identified by September 15, and deposed by October 15; and (4) all other parties' opinion witnesses identified by November 15, and deposed by December 15.
Chicago Counsel identified attorney James Shipman as their expert witness on November 15, 1996. The disclosure statement revealed that Shipman was prepared to testify that (1) Chicago Counsel acted reasonably and were not negligent in their representation of plaintiffs, but that Davis was negligent for failing to timely file the complaint, and (2) he believed it would be highly unlikely, given the history of jury verdicts in the Iowa federal courts, the nature of Tommie's injuries, and his vocational abilities, that plaintiffs would have recovered a jury verdict exceeding the settlement collected from Tommie's employer.
Plaintiffs, however, failed to disclose opinion witnesses by the September 15 deadline and failed to appear at a scheduled case management conference in December. On December 19, 1996, Chicago Counsel filed a motion to bar plaintiffs from naming opinion witnesses and a motion for summary judgment.
On January 6, 1997, new counsel appeared on behalf of plaintiffs and filed a response to the motion to bar experts and a disclosure statement naming Roger Denton, the attorney who initially represented them in this case, as their expert witness. In their response to the motion to bar experts, plaintiffs explained that Chicago Counsel's repeated refusal to make defendant VanBree available for deposition since their first request in July 1995 prejudiced their ability to file an adequate and timely expert witness disclosure. Plaintiffs also filed a motion for summary judgment based upon Chicago Counsel's lack of cooperation in making VanBree available for deposition.
The trial court entered an order on May 2, 1997, granting defendant's motion to bar plaintiffs' expert witness, granting summary judgment in favor of Chicago Counsel, and denying plaintiffs' motion for summary judgment. The court found that plaintiffs' counsel failed to: appear at two case management conferences; disclose any expert witnesses by October 15 as ordered by the court; seek an extension of the deadline of October 15; or show good cause why they could not disclose experts by that date.[2] The court also *1129 found that plaintiffs would be unable to prove their case without a standard of care expert. The action against Davis continued until he filed a motion for summary judgment in August 1997 which was granted by the trial court based upon plaintiffs' lack of an expert witness.
On appeal, plaintiffs contend that the trial court erred in (1) barring them from presenting opinion witnesses and (2) granting summary judgment in favor of Chicago Counsel and Davis after finding that plaintiffs could not prevail on their claim, as a matter of law, without opinion testimony on the applicable standard of care.

ANALYSIS
Pursuant to Supreme Court Rule 219(c), trial judges are afforded the authority to enter a wide range of orders when a party unreasonably fails to comply with discovery rules and orders. 134 Ill.2d R. 219(c). The decision whether to impose sanctions for failure to comply with a discovery order and, if so, what type of sanction to impose, are decisions largely within the sound discretion of the trial court. Peterson v. Ress Enterprises, Inc., 292 Ill.App.3d 566, 579, 226 Ill. Dec. 848, 857, 686 N.E.2d 631, 640 (1997). Such decisions will not be overturned on appeal absent an abuse of discretion. Vallejo v. Mercado, 220 Ill.App.3d 1, 8, 162 Ill.Dec. 692, 697, 580 N.E.2d 655, 660 (1991).
However, the purpose of Supreme Court Rule 219(c) is to advance the discovery process and encourage a trial on the merits. Farley Metals, Inc. v. Barber Colman Co., 269 Ill.App.3d 104, 109-10, 206 Ill.Dec. 712, 715-16, 645 N.E.2d 964, 967-68 (1994). Its purpose is not to punish the offending party, and judges may not impose sanctions that are intended primarily as punishment. Kubian v. Labinsky, 178 Ill.App.3d 191,196, 127 Ill.Dec. 404, 407, 533 N.E.2d 22, 25 (1988). Consequently, the trial court's discretion in imposing sanctions is limited by the requirement its order be just. 134 Ill.2d R. 219(c); Vallejo, 220 Ill.App.3d at 8, 162 Ill.Dec. at 697, 580 N.E.2d at 660.
In the instant case, plaintiffs acknowledge that they failed to disclose their expert witness and present him for deposition within the time period ordered by the trial court. They contend, however, that the discovery sanction imposed upon them constituted an abuse of discretion. Although we do not condone plaintiffs' disregard of the discovery deadlines established by the trial court and believe sanctions were in order, we agree with plaintiffs that the sanction imposed was unjust under the circumstances and must be reversed.
In determining the proper severity of sanctions for failure to make a timely expert witness disclosure, trial courts should consider the following factors: (1) the surprise to the adverse party; (2) the prejudicial effect of the expert's testimony; (3) the nature of the expert's testimony; (4) the diligence of the adverse party; (5) whether objection to the expert's testimony was timely; and (6) the good faith of the party calling the witness. Jarke v. Jackson Products, Inc., 282 Ill.App.3d 292, 297, 217 Ill.Dec. 861, 864, 668 N.E.2d 46, 49 (1996). Consideration of these factors demonstrates that the trial court abused its discretion in barring plaintiffs from naming expert witnesses in this case.
There is nothing in the record to suggest that the defendants were surprised or prejudiced by the plaintiffs' late disclosure of their expert witness. To the contrary, the defendants knew that the nature of plaintiffs' claim required the presentation of the testimony of an expert witness, and Chicago Counsel had secured an expert of their own. The defendants were also aware of the numerous delays in the discovery process for which all parties apparently bore responsibility. Further, despite the fact that this case had been pending since April 1993, no trial date had been set and the parties were still in the early stages of discovery. Under the circumstances, we cannot see how the defendants were prejudiced by plaintiffs' tardy disclosure of their expert witnesses in this instance.
*1130 The testimony of an expert was necessary in this case to demonstrate the applicable standard of care as well as proof of damages. See Barth v. Reagan, 139 Ill.2d 399, 407, 151 Ill.Dec. 534, 538, 564 N.E.2d 1196,1200 (1990) (finding that failure to present expert testimony is usually fatal to a legal malpractice action). Thus, the trial court's decision to bar plaintiffs from presenting such evidence effectively scuttled their case and resulted in summary judgment. A sanction that results in summary disposal of a claim should be used as a last resort only where other enforcement powers at the court's disposal have failed to advance the litigation. See Senese v. Climatemp, Inc., 289 Ill.App.3d 570, 584, 224 Ill.Dec. 705, 715, 682 N.E.2d 266, 276 (1997).
Further, although the defendants contend that plaintiffs were not diligent because they did not make timely disclosure of their expert or seek an extension of the September 15 deadline, a review of the facts reveals that plaintiffs' actions were not completely without basis. At the time when the trial court barred plaintiffs from naming any experts, fact discovery was not yet complete and plaintiffs were not yet given the opportunity to depose defendant VanBree despite repeated attempts to do so. It was reasonable for plaintiffs to desire to depose the defendants prior to presenting their expert for deposition. Further, plaintiffs' complaint had been dismissed and refiled and plaintiff had retained new counsel during the timeframe that these discovery deadlines were passing and the motion to bar was filed.
After Chicago Counsel filed their motion to bar, plaintiffs promptly responded by (1) filing a disclosure statement naming their expert witness and (2) filing a response to the motion to bar explaining the delay and asking for leave to amend their disclosure upon completion of fact discovery. Contrary to Chicago Counsel's contention, we find no evidence that these remedial actions were taken by plaintiffs for any reason other than a good faith effort to fulfill the discovery obligation and preserve their position.
Certainly plaintiffs could and should have done more to protect their interests by filing a motion to compel Chicago Counsel to present VanBree for deposition and by seeking an extension of time for disclosure of their expert. In this regard, we determine that plaintiffs' failure to comply with the discovery order was, indeed, sanctionable. However, the trial court clearly could have fashioned a more reasonable sanction which would have (1) balanced the interests of all parties while acknowledging the discovery violation, and (2) promoted the goal of expeditiously accomplishing discovery without punishing the plaintiffs for what appears to be their attorneys' failure to diligently pursue their legal malpractice case.
Defendant's urge this court to follow the Fourth District's decision in Prather v. McGrady, 261 Ill.App.3d 880, 199 Ill.Dec. 460, 634 N.E.2d 299 (1994); however, we decline to do so for the following reasons. Unlike in Prather, the instant record reveals that there was no trial date pending when defendants moved to bar plaintiffs' experts. Furthermore, we believe that the Prather decision failed to give meaningful consideration to whether the sanction imposed by the trial court was, in fact, reasonable which is required by Supreme Court Rule 219(c) and the factors set forth in Jarke.
A trial court should generally avoid barring an expert witness from testifying if to do so would deny a party a trial on the merits. See Andrews v. Northwestern Memorial Hospital, 184 Ill.App.3d 486, 492, 132 Ill.Dec. 707, 711, 540 N.E.2d 447, 451 (1989). This is particularly true when the violation occurs at the pretrial stage and no trial date has yet been set. See Kubian, 178 Ill.App.3d at 202, 127 Ill.Dec. at 411, 533 N.E.2d at 29. We hold that the trial court's decision to sanction plaintiffs by barring them from naming expert witnesses was unreasonable in the instant case, served primarily to punish plaintiffs, and constituted an abuse of discretion. In light of our decision, we must also find that the trial court improperly granted summary judgment.
Summary judgment is properly granted only when the pleadings, depositions, and affidavits show that no genuine issue of material fact exists and the moving party is entitled to judgment as a matter of law. 735 ILCS 5/2-1005 (West 1996). Because the *1131 trial court barred plaintiffs from naming expert witnesses, plaintiffs were unable to present an expert's affidavit in opposition to both Chicago Counsel's and Davis's motions forsummary judgment. As a result, the trial court did not have the opportunity to consider whether such evidence would have raised a genuine issue of material fact precluding entry of summary judgment. Thus, the trial court's decision to grant summary judgment was tainted by its erroneous decision to bar plaintiffs from naming an expert. See Keating v. Dominick's Finer Foods, Inc., 224 Ill.App.3d 981, 987, 167 Ill.Dec. 175, 179, 587 N.E.2d 57, 61 (1992).
Therefore, we reverse the trial court's order granting defendant's motion to bar plaintiffs from naming expert witnesses and its order granting summary judgment, and we remand the cause for further proceedings consistent with this opinion.

CONCLUSION
For the forgoing reasons, the judgment of the circuit court of Peoria County is reversed and the cause is remanded for further proceedings.
Reversed and remanded.
BRESLIN and SLATER, JJ., concur.
NOTES
[1]  The original complaint, naming only Chicago counsel as defendants, was filed in the circuit court of Madison County. Davis was added as a defendant when the first amended complaint was filed in July 1993. The case was then transferred to the circuit court of Peoria County in September 1994, and there was no subsequent action in the case evidenced in the record until May 1995.
[2]  The trial judge mistakenly referred to October 15 as the deadline for plaintiffs' disclosure of opinion witnesses. As previously indicated, the case management order provided that plaintiffs' experts be identified by September 15 and deposed by October 15.
