With court approval, the party may amend its pleading to assert an affirmative defense any time prior to judgment. Horwitz ex. rel. Gilbert v. Bankers Life and Casualty Co., 745 N.E.2d 591 (1st Dist. 2001).
The trial court has discretion to permit a party to plead an affirmative defense that was not included in its answer. In making this determination, the court will review the circumstances including the stage in the proceeding in which the affirmative defense is first asserted as well as any prejudice to the plaintiff. The case involved an action by an insured against her health insurer to challenge increases in premiums. The Court dismissed some of plaintiff's claims, and then the parties filed cross-motions for summary judgment. In connection with a request for reconsideration of one of the summary judgment rulings, the insurer first asserted the "filed rate doctrine" as an affirmative defense. (Under this doctrine, where a regulated entity is required to file its rates with the governmental agency charged with authority to regulate those rates, an individual is barred from attacking those rates in a civil action for damages.)
The Court permitted the filing of the affirmative defense under Section 2-616(a) of the Illinois Code of Civil Procedure, reasoning that the affirmative defense was not necessarily waived because it was not included in the insurer's answer. The Court reasoned that plaintiff still had ample time to respond to the affirmative defense, and therefore was not unfairly prejudiced.