This case arises from a patent infringement action in the United States District Court for the Northern District of Illinois, No. 91-CV-4451, in which Inland Steel Company accused USX Corporation of patent infringement. USX appeals from a decision of the district court denying its motion for attorney fees and costs based on the district court’s ruling that USX was not a “prevailing party.” We reverse the district court’s ruling on USX’s status as a prevailing party and remand for the district court to determine whether USX is entitled to attorney fees and costs.
I
Inland Steel sued USX, alleging that USX had infringed two of its patents, U.S. Patent Nos. 4,421,574 and 4,483,723. The district court trifurcated the case, intending to hold separate trials on patent infringement, validity, and, if necessary, damages. The trial on infringement proceeded before a jury, which found that USX had infringed the patents. During the pendency of the case, USX initiated reexamination procedures for the patents in the United States Patent and Trademark Office (“PTO”). Following the trial on infringement but before the trials on validity or damages, the district court dismissed the case “with leave to reinstate” pending the outcome of the reexamination. After reexamining the patents, the PTO determined that the patents were invalid and canceled the patents. Inland Steel appealed from the PTO’s determination with respect to certain of the claims, but we upheld the PTO’s decision canceling those claims. In re Inland Steel Co., 265 F.3d 1354 (Fed.Cir.2001).
Following the reexamination, USX moved the district court to reopen the case, to enter judgment on its invalidity counterclaims, and to enter an award of attorney fees and costs in connection with the earlier proceedings in the district court. The district court granted USX’s motion to reopen the case, but it denied USX’s motion for entry of judgment on its counterclaims of patent invalidity on the ground that the counterclaims were moot in light of the PTO’s decision. The court also denied USX’s motion for attorney fees and costs on the ground that USX was not a “prevailing party.” In a minute order, the district court explained its ruling by stating that “USX Corporation prevailed in the PTO, where it chose to litigate the issue of patent invalidity, rather than in this court.” Because the district court concluded that USX was not the prevailing party, the court did not reach the question whether the case was exceptional.
The district court then entered judgment on USX’s motion for attorney fees and costs. Because the judgment did not dismiss the entire case, we ruled that it was not a final judgment and that we did not have jurisdiction to hear USX’s appeal. We dismissed the case with leave to reinstate once a final judgment was entered. The district court then entered an order reiterating its denial of attorney fees and costs, and it entered a final judgment dismissing the complaint and holding that the counterclaims “are mooted by the action of the Patent and Trademark Office.” USX sought reinstatement of its appeal, again challenging the denial of its request for attorney fees and costs.
As we are satisfied that we have jurisdiction, we grant USX’s motion to reinstate the appeal, and we turn to the merits.
II
Under 35 U.S.C § 285 and Rule 54(d), Fed.R.Civ.P., attorney fees and costs can be awarded to a prevailing party. The question in this case is whether USX is a “prevailing party” and thus potentially eli*1320gible for the award of attorney fees and costs. Inland Steel argues USX is not a prevailing party, because it did not prevail on the issue of validity in the district court. USX argues that, although it did not litigate the issue of invalidity in the district court, it is nonetheless a prevailing party because the cancellation of the patents resulted in the dismissal of the complaint, including the infringement claims, and thus resulted in a judgment in the district court action that was favorable to USX.
Inland Steel first argues that we should review the district court’s ruling on prevailing party status under Seventh Circuit law for abuse of discretion. However, we have made clear that we “apply[ ] our own law to define the meaning of prevailing party in the context of patent litigation.” Manildra Milling Corp. v. Ogilvie Mills, Inc., 76 F.3d 1178, 1181 (Fed.Cir.1996). Moreover, our review of the meaning of the term “prevailing party” is de novo. Waner v. Ford Motor Co., 331 F.3d 851, 857 (Fed.Cir.2003) (“We review de novo whether the district court applied the proper legal standard under 35 U.S.C. § 285, and we review the court’s factual findings, including whether the case is exceptional, for clear error.”).
In determining whether a party is a prevailing party in patent litigation, we apply the general principle that “to be a prevailing party, one must ‘receive at least some relief on the merits,’ which ‘alters ... the legal relationship of the parties.’ ” Former Employees of Motorola Ceramic Prods. v. United States, 336 F.3d 1360, 1364 (Fed.Cir.2003), quoting Buckhannon Bd. & Care Home, Inc. v. W. Va. Dep’t of Health & Human Res., 532 U.S. 598, 603-05, 121 S.Ct. 1835, 149 L.Ed.2d 855 (2001). For example, in Pharmacia & Upjohn Co. v. Mylan Pharmaceuticals, Inc., we held that a defendant could qualify for attorney fees and costs when the defendant won on the issue of invalidity by virtue of collateral estoppel. 182 F.3d 1356, 1359-60 (Fed. Cir.1999). Similarly, in PPG Industries Inc. v. Celanese Polymer Specialties Co., although the. court did not expressly determine that the defendant was a prevailing party, the court awarded attorney fees to the defendant following the reopening of a case in which the district court stayed the action pending a reissue examination that resulted in the PTO canceling the patent. 840 F.2d 1565, 1567 (Fed.Cir.1988).
In this case, the district court effectively stayed the entire litigation pending the resolution of the reexamination proceedings in the PTO. See Balt. & Ohio Chi. Terminal R.R. Co. v. Wis. Cent. Ltd., 154 F.3d 404, 408 (7th Cir.1998) (the Seventh Circuit ordinarily “treat[s] a dismissal with leave to reinstate as if it were a stay”). Following the reexamination, the district court reopened the ease and entered judgment dismissing the case with prejudice in favor of USX. Although the district court dismissed USX’s invalidity counterclaims as moot in light of the PTO’s reexamination, the district court did enter judgment in USX’s favor on the issue of infringement. This is “relief on the merits which alters ... the legal relationship of the parties.” Former Employees of Motorola, 336 F.3d at 1364. Thus, like the defendants in Pharmacia and PPG Industries,_ USX is a prevailing party on a claim adjudicated by the district court, even though it initially prevailed on the issue of invalidity in a different forum.
An indication of USX’s status as a prevailing party is that the judgment it obtained in this case would have res judicata effect as to any claim brought against USX in the future with respect to the patent claims that were at issue in the district court case. Anthony v. Marion County Gen. Hosp., 617 F,2d 1164, 1169-70 (5th Cir.1980) (“Although there has not been an adjudication on the merits in the sense of a *1321weighing of facts, there remains the fact that a dismissal with prejudice is deemed an adjudication on the merits for the purposes of res judicata. As such, the hospital has clearly prevailed in this litigation.”); accord Schwarz v. Folloder, 767 F.2d 125, 130 (5th Cir.1985) (“Having already held that a dismissal with prejudice may be granted at any time in a lawsuit because it does not prejudice the defendant, we would be inconsistent to deny the defendant ‘prevailing party’ status, since such a denial would be precisely the type of prejudice to the defendant that we claimed would not occur. Because a dismissal with prejudice is tantamount to a judgment on the merits, the defendant in this case— Alexander Grant — is clearly the prevailing party and should ordinarily be entitled to costs.”). When the plaintiff voluntarily dismisses the lawsuit prior to final judgment, it has been held that the defendant is not necessarily a prevailing party. See Dean v. Riser, 240 F.3d 505, 509 (5th Cir.2001). That is not the situation in this case, however, because here the district court entered a final judgment in favor of USX not in response to a motion to dismiss by the plaintiff, but in response to a request by USX for judgment based on the action of the PTO in canceling the patent in suit. Accordingly, in the circumstances of this case, USX must be regarded as the prevailing party.
Ill
Because the district court dismissed USX’s request for fees and costs based on the threshold issue of prevailing party status, the district court did not reach the question whether this case is “exceptional” within the meaning of 35 U.S.C. § 285, or how the court should exercise its discretion to allow or deny costs to the prevailing party. In light of our ruling that USX is a prevailing party, the district court must therefore determine whether the case is “exceptional,” so as to call for an award of fees, and it must determine whether the case is appropriate for an award of costs under governing Seventh Circuit precedents applying Rule 54(d), see Manildra, 76 F.3d at 1183.
Each party shall be responsible for its own costs in connection with this appeal.
REVERSED and REMANDED.