
521 S.E.2d 632 (1999)
239 Ga. App. 596
HARDY
v.
GEORGIA BAPTIST HEALTH CARE SYSTEMS, INC.
No. A99A1499.
Court of Appeals of Georgia.
August 11, 1999.
Lucinda Perry, Douglasville, for appellant.
Duvall, McCumber & Doverspike, Jerry D. McCumber, Decatur, Arnall, Golden & Gregory, Stacy G. Freeman, Atlanta, for appellee.
ELDRIDGE, Judge.
On June 7, 1996, Tina Hardy, plaintiff-appellant, sued Georgia Baptist Health Systems, Inc. d/b/a Liberty Home Health Services, defendant-appellee, on claims arising from her termination as an employee. These claims were based upon three federal issues theories, as follows: (1) 42 USC § 1985(3); (2) equal protection, and the privileges and *633 immunity clause, as guaranteed by the Fourteenth Amendment; and (3) the free speech clause of the First Amendment. There were also two pendent state issues, i.e., a claim of intentional infliction of emotional distress and a defense pursuant to OCGA § 31-39-7. In the federal action, defendant moved for, and on April 25, 1997, was granted summary judgment on all theories.
In anticipation of such adverse determination, on February 7, 1997, plaintiff filed this defamation action against the defendant. By subsequent amendments on February 14, 1997, July 9, 1997, and July 25, 1997, plaintiff expanded the complaint also to allege conspiracy to terminate and wrongful termination in retaliation for free speech, intentional infliction of emotional distress, and a defense pursuant to OCGA § 31-39-7. Defendant again moved for summary judgment.
Defendant did not raise in either the answer or the amended answer the affirmative defense of res judicata. See OCGA § 9-11-8(c). However, defendant raised the affirmative defense of res judicata as part of its motion for summary judgment and filed copies of the federal complaint and federal order granting summary judgment.
On December 7, 1997, the trial court granted summary judgment on the basis of res judicata. On January 2, 1998, plaintiff filed her notice of appeal.
The enumeration of error is that the trial court erred in granting summary judgment. We do not agree.
1. Plaintiff first contends that the trial court erred in considering the affirmative defense on summary judgment when it had not been first raised by answer or amendment. However, subsection (c) of OCGA § 9-11-8 does not imply that an affirmative defense can be raised only by answer. OCGA § 9-11-8(c); Brown v. Moseley, 175 Ga.App. 282, 333 S.E.2d 162 (1985).
The purpose of the requirement that affirmative defenses be pleaded is to prevent surprise and to give the opposing party fair notice of what he must meet as a defense. If it is not pleaded it is generally held that the defense is waived, but if it is raised by motion, or by special plea in connection with the answer or by motion for summary judgment there is no waiver. [Cits]
Phillips v. State Farm Mut. Auto. Ins. Co., 121 Ga.App. 342, 346(2), 173 S.E.2d 723 (1970); Daniel & Daniel, Inc. v. Cosmopolitan Co., 146 Ga.App. 200, 201(1), 245 S.E.2d 885 (1978). An affirmative defense can be raised for the first time on motion for summary judgment or other motions. O'Quinn v. O'Quinn, 237 Ga. 653, 654, 229 S.E.2d 428 (1976); Beazley v. Williams, 231 Ga. 137, 138, 200 S.E.2d 751 (1973); Rimes Tractor & Equip. v. Agricredit Acceptance Corp., 216 Ga.App. 249, 250-251, 454 S.E.2d 564 (1995); Brown v. Quarles, 154 Ga.App. 350, 351-352(1), 268 S.E.2d 403 (1980); Phillips v. State Farm Mut. Auto. Ins. Co., supra at 346, 173 S.E.2d 723; Ezzard v. Morgan, 118 Ga.App. 50, 51(1), 162 S.E.2d 793 (1968). However, an affirmative defense cannot be raised for the first time on oral argument on motion for summary judgment, because the opposing party has been afforded no notice to defend against such surprise affirmative defense. Hansford v. Robinson, 255 Ga. 530(1), 340 S.E.2d 614 (1986). In this case, the trial court had the issue of res judicata before it on the record.
2. OCGA § 9-12-40 provides that "[a] judgment of a court of competent jurisdiction shall be conclusive between the same parties and their privies as to all matters put in issue or which under the rules of law might have been put in issue in the cause wherein the judgment was rendered." Plaintiff brought the action in federal district court against the defendant on substantially the same issues and such trial court entered judgment adverse to her. In such federal action there was an adjudication on the merits by motion for summary judgment. See OCGA § 9-12-42.
While the issues of defamation were not raised in the federal action, such pendent state claims could have been litigated.
This court has held in Pope v. City of Atlanta, 240 Ga. 177, 240 S.E.2d 241 (1977), and, more recently, in Hill v. Wooten, 247 Ga. 737, 279 S.E.2d 227 (1981), that where a party fails to present a state law claim in federal court, a later suit in *634 the state courts will be barred if the state claim could have been litigated in the federal court under its pendent jurisdiction. [Id.] at 738, 279 S.E.2d 227.
(Punctuation omitted.) McNeal v. Paine, Webber, Jackson &c., Inc., 249 Ga. 662, 663(1), 293 S.E.2d 331. "In order for the federal and state questions to be considered as one `case,' the federal question must be sufficiently substantial to confer subject matter jurisdiction, and the federal and state claims `must derive from a common nucleus of operative fact.'" Id.; accord Bradley v. Ga. Institute of Technology, 228 Ga.App. 216, 218(1)(a), 491 S.E.2d 453 (1997); Danzell v. Cannon, 224 Ga.App. 602, 603(1), 481 S.E.2d 588 (1997); Franklin v. Gwinnett County Pub. Schools, 200 Ga.App. 20, 21-22, 407 S.E.2d 78 (1991).
The federal district judge determined that the federal question was sufficiently substantial to confer subject matter jurisdiction, because she rendered a judgment not only on the merits of the federal questions but also on the pendent state claims as well.
Therefore, the trial court properly granted summary judgment on the basis that the prior adjudication in federal court barred pursuit of the defendant by operation of the doctrine of res judicata. McNeal v. Paine, Webber, Jackson &c., Inc., supra at 663, 293 S.E.2d 331.
Judgment affirmed.
POPE, P.J., and SMITH, J., concur.
