In 2013, Illinois state prison inmate Donald McDonald filed what should have been a typical federal constitutional suit under 42 U.S.C. § 1983. McDonald alleged that Defendants Warden Marcus Hardy, *345Assistant Warden Daryl Edwards, and Chaplain George Adamson were denying his First Amendment free exercise rights as a practicing Muslim. He sought only injunctive relief in the district court.
McDonald’s case hit a procedural snag because three years earlier he had filed a claim for damages based on the same facts in the Illinois Court of Claims. More than two years later, when he had received no decision from the Court of Claims, he filed this case pro se in the district court. After the Court of Claims denied McDonald’s request for relief, the district -court dismissed his federal complaint as barred by res judicata.
On appeal, defendants concede that McDonald’s suit is not barred by res judicata. Therefore, we reverse the judgment of the district court and remand for proceedings in conformity with this opinion. We express no opinion regarding the merits of defendants’ remaining arguments on appeal, which are not properly before the court at this stage.
I. Background
Donald McDonald is an inmate at Stateville Correctional Center in Crest Hill, Illinois. On July 23, 2010,' he filed a complaint in the Illinois Court of Claims against the Illinois Department of Corrections for violation of his free exercise rights. In his complaint, McDonald alleged, inter alia, that Muslim inmates at State-ville are not permitted to attend prayer service each Friday, that prison officials regularly steal Arabic prayer cassette tapes and Muslim prayer rugs, and that Christians are permitted to have more volunteers enter the facility than are Muslims. He .sought a damages award of $5,000 and an order requiring the Department to cease violating his religious rights.1
The Court of Claims held a hearing on McDonald’s claims, but it then failed to issue a decision for more than two years. While he was awaiting that decision, McDonald filed this case in the district court on March 14, 2013. His pro se complaint named Chaplain George Adamson, Warden Marcus Hardy, and Assistant Warden Daryl Edwards as defendants in their official capacities. It sought only injunctive relief. Although the factual allegations in the federal complaint differ in some small respects from the Court of Claims filing, McDonald clearly considered it part of the same case he had filed in 2010.2
On July 24, 2013, the Court of Claims finally issued a decision in McDonald’s original case. The court rejected all of McDonald’s allegations in a terse two-page order. The order directly addressed only one of McDonald’s factual allegations, stating that evidence indicated that Muslim services occurred each Friday at Stateville unless the facility was on lock-down. Defendants then moved to dismiss the federal complaint, arguing that the Court of Claims order rendered McDonald’s federal complaint barred by res judicata. The district court ■ granted the motion, and McDonald timely appealed.
II. Discussion
We review the grant of a motion to dismiss under Rule 12(b)(6) de novo; we accept all facts pleaded as true and draw all reasonable inferences in McDonald’s *346favor. Thulin v. Shopko Stores Operating Co., 771 F.3d 994, 997 (7th Cir. 2014).
A. Res Judicata
The doctrine of res judicata, or claim preclusion, “protects the finality” of a judgment and “prevents parties from undermining it by attempting to relitigate the claim.” Palka v. City of Chicago, 662 F.3d 428, 437 (7th Cir. 2011). Where it applies, it prohibits relitigation not only of claims already decided in a prior proceeding, but also those that could have been litigated in that proceeding based on the same operative facts. Id. To determine whether McDonald’s federal claim is barred by the adverse judgment in the Court o.f Claims, we apply the preclusion law of Illinois. See CFE Grp., LLC v. Firstmerit Bank, N.A., 809 F.3d 346, 351 (7th Cir. 2015).
Defendants are correct to concede that McDonald’s § 1983 claim is not barred. Illinois law affords preclusive effect only to “a final judgment rendered by a court of competent jurisdiction.” Arlin-Golf, LLC v. Vill. of Arlington Heights, 631 F.3d 818, 821 (7th Cir. 2011) (quoting Nowak v. St. Rita High Sch., 197 Ill.2d 381, 258 Ill.Dec. 782, 757 N.E.2d 471, 477 (2001)). The Illinois Court of Claims “is not a ‘Court’ within the meaning of article VI of the Illinois Constitution of 1970.” Klopfer v. Court of Claims, 286 Ill.App.3d 499, 221 Ill.Dec. 876, 676 N.E.2d 679, 683 (1997). It lacks jurisdiction to consider claims based upon a federal statute or the federal or state constitutions. Michaelis v. Ill. Dep’t of Mental Health & Developemental Disabilities, 61 Ill.Ct.Cl. 270, 272 (2008). Therefore, it is not a “court of competent jurisdiction” under Illinois preclusion law. An adverse judgment in the Court of Claims does not bar a subsequent § 1983 claim in federal court based upon the same facts. The district court erred by dismissing McDonald’s complaint as barred by res judicata.
B. Collateral Estoppel
Although they concede that res judicata is inapplicable, defendants argue for the first time on appeal that collateral estop-pel, or issue preclusion, bars relitigation of three of McDonald’s factual allegations. Specifically, defendants contend that the Court of Claims conclusively resolved McDonald’s allegations regarding the lack of weekly Friday Muslim prayer services, stolen prayer rugs, and stolen cassette tapes. They concede that the remaining allegations in the federal complaint are not precluded and must be addressed on remand.
We decline to reach defendants’ collateral estoppel argument. Although they are related, res judicata and collateral estoppel are not the same. See Jones v. City of Alton, 757 F.2d 878, 884 (7th Cir. 1985). Collateral estoppel “refers to the effect of a judgment in foreclosing litigation in a subsequent action of an issue of law or fact that has been actually litigated and decided.” Meyer v. Rigdon, 36 F.3d 1375, 1378 n.l (7th Cir. 1994). Therefore, it is both broader and narrower than res judicata. Collateral estoppel is broader than res judicata because it bars relitigation of facts conclusively determined in a previous proceeding even if that court did not have jurisdiction over the later claim. See Grogan v. Garner, 498 U.S. 279, 284-85, 111 S.Ct. 654, 112 L.Ed.2d 755 (1991) (explaining that a bankruptcy court in a dischargeability action would give preclu-sive effect to the facts underlying a fraud judgment even though only the bankruptcy court has jurisdiction over the discharge-ability action itself). It is also narrower because res judicata bars any suit involving the same operative facts, even if that specific cause of action was never litigated *347in the first court. Arlin Golf, 631 F.3d at 821. Thus, res judicata and collateral es-toppel are separate legal doctrines.
Because collateral estoppel is a distinct affirmative defense, defendants bore the burden to raise it in the district court and show that its application is clear on the face of McDonald’s complaint. Adair v. Sherman, 230 F.3d 890, 894 (7th Cir. 2000); see also Sidney Hillman Health Ctr. of Rochester v. Abbott Labs., Inc., 782 F.3d 922, 928 (7th Cir. 2015) (because plaintiffs need not anticipate an affirmative defense, a motion to dismiss on such a ground should fail “[a]s long as there is a conceivable set of facts, consistent with the complaint, that would defeat [the defense]”). By arguing only res judi-cata below, defendants did not attempt to carry this burden with respect to collateral estoppel. We will not affirm a judgment based on an affirmative defense raised for the first time' on appeal. Marshall-Mosby v. Corporate Receivables, Inc., 205 F.3d 323, 327 (7th Cir. 2000).
III. Conclusion
Because the Illinois. Court of Claims lacked jurisdiction to decide McDonald’s federal constitutional claim, the judgment dismissing his complaint is reversed. We decline to address defendants’ collateral estoppel arguments raised for the first time on appeal. The case is remanded to the district court for proceedings consistent with this opinion. On remand, the district court is free to grant McDonald leave to amend his complaint, and defendants may then renew their motion to dismiss.3
Reversed and Remanded.
. Notwithstanding McDonald’s prayer for relief, the Court of Claims actually lacks jurisdiction "to issue injunctive relief that either forbids or compels actions by any State officer or agencies.” Knight v. State of Illinois, 65 Ill.Ct.Cl. 210, 215(2013).
. McDonald stated in the federal complaint that he “originally filed these claims to the Illinois Court of Claims....”
. We also leave defendants' mootness argument for resolution on remand. Defendants argue that McDonald's claim regarding lack of weekly Muslim prayer services is now moot. They submit a declaration from Chaplain Adamson stating that weekly services have been offered since January 11, 2016, and a thank you note from McDonald acknowledging the change. Because voluntary cessation of a challenged practice does not deprive the federal courts of jurisdiction to determine its legality, we need not address at this point whether this evidence is sufficient to moot McDonald's claim. Friends of the Earth, Inc. v. Laidlaw Envtl. Servs. (TOC), Inc., 528 U.S. 167, 189, 120 S.Ct. 693, 145 L.Ed.2d 610 (2000). In the event that defendants renew their motion to dismiss, the district court can determine in the first instance whether they have met their “heavy burden” to persuade the court “that the challenged conduct cannot reasonably be expected to start up again." Id.