#### CAPITOL HILL GROUP, A California Corporation, Appellant v. PILLSBURY, WINTHROP, SHAW, PITTMAN, LLC, A Delaware Limited Liability Partnership, et al., Appellees.

No. 08-7109.

United States Court of Appeals, District of Columbia Circuit.

Argued May 11, 2009.

Decided June 26, 2009.

*487Emil Hirsch argued the cause and filed the briefs for appellant.

Jack McKay argued the cause and filed the brief for appellees.

Before HENDERSON, BROWN and KAVANAUGH, Circuit Judges.

Opinion for the Court filed by Circuit Judge BROWN.

BROWN, Circuit Judge:

Appellant Capitol Hill Group (CHG) filed suit in the Superior Court of the District of Columbia against its former counsel, Shaw Pittman (now Pillsbury Winthrop Shaw Pittman LLP) and various associated attorneys, for claims stemming from alleged legal malpractice. Appellees removed the case to federal court, asserting federal jurisdiction under 28 U.S.C. § 1334(b), so-called “arising in” bankruptcy jurisdiction. The district court denied appellant’s motion to remand for lack of jurisdiction, and later granted summary judgment for appellees because CHG’s claims are barred by res judicata. Finding no error, we affirm.

I.

To make a long and already well-documented story short — well, somewhat shorter — we summarize the relevant facts. CHG filed for bankruptcy in February 2002. CHG’s primary asset, commercial property in the District of Columbia, was embroiled in a zoning dispute with the District’s Department of Consumer and Regulatory Affairs regarding the amount of off-street parking required. The controversy continued during the bankruptcy proceedings and Shaw Pittman, CHG’s court-approved bankruptcy counsel, represented CHG in the zoning process.

Initially CHG was told it would have to provide 225 parking spaces, but in March 2003 the Zoning Administrator decided 85 spaces would suffice. In January 2004, after a neighborhood association appealed, the Board of Zoning Adjustment (BZA) affirmed, but then decided to reconsider its ruling. On February 24, 2004, the BZA finally settled on a total of 177 spaces, an announcement it made orally. The ruling was not issued in written form until September 9, 2004, at which time it was transmitted by the BZA to Shaw Pittman, but not to CHG itself. According to CHG, such an expansive parking requirement “effectively precludes CHG from either *488utilizing a substantial portion of the Property itself, or leasing it to others[.]”

In the interim the bankruptcy court granted Shaw Pittman’s request to terminate its court-approved representation of CHG. Shaw Pittman returned its BZA-related files to CHG but did not tell the BZA it had stopped representing CHG. As a courtesy, Shaw Pittman informed CHG of the BZA’s decision to reconsider its favorable January ruling at a hearing to take place on February 24 — information a Shaw Pittman attorney gleaned while present at the BZA on other business.

CHG and Shaw Pittman’s post-representation relations were rocky. CHG first complained that Shaw Pittman’s fees were unreasonable. After contested hearings, the bankruptcy judge granted summary judgment to Shaw Pittman and “awarded the firm fees based primarily on its conclusion that CHG had agreed not to contest the amount of the fees. The bankruptcy judge also made oral findings that Shaw Pittman’s services were professional and that Shaw Pittman deserved to be compensated for those services.” *Capitol Hill Group v. Pillsbury Winthrop Shaw Pittman, LLP,*574 F.Supp.2d 143, 146 (D.D.C.2008). The district court affirmed the bankruptcy court’s decision. *In re Capitol Hill Group,*313 B.R. 344, 358 (D.D.C.2004).

Shaw Pittman then filed an application for fees and costs incurred during the first fee dispute. After a trial on October 21 and 22, the bankruptcy judge orally ruled that CHG was responsible for paying all fees and expenses that were reasonably foreseeable as a result of engaging in the fee litigation with Shaw Pittman. Nevertheless, the cycle of acrimony continued. After a one-day trial on a third fee application on August 1, 2005, the bankruptcy court approved the application. The court later entered a fourth and a fifth fee judgment with the consent of CHG. On April 12, 2006, the parties made one final appearance before the bankruptcy court, after Shaw Pittman filed a motion to compel because it feared CHG was withholding further claims. The bankruptcy court specifically asked CHG whether it had any other claims against the firm. CHG’s counsel stated “[tjhere are concerns that CHG has about the representation that Shaw Pittman provided during its representation of Capitol Hill Group that began in 1999 or whatever. But nothing’s been filed.” CHG also represented it “had no outstanding claims against Shaw Pittman arising out of the bankruptcy proceedings.” *Capitol Hill Group,*574 F.Supp.2d at 147. In addition, “[t]he bankruptcy court noted that CHG could have pursued malpractice claims against Shaw Pittman regarding the adequacy of its representation,” in addition to claims CHG had made about excessive fees and related professional misconduct, “but that it had failed to do so and would therefore be barred from later asserting such claims by the doctrine of res judicata.” *Id.*

In this suit, CHG alleges Shaw Pittman committed malpractice in two respects: by failing to notify CHG when BZA issued the September 2004 order, and by failing to make a particular legal argument to the BZA. Shaw Pittman removed the case to federal court. The district court concluded it had jurisdiction, and granted summary judgment for appellees because CHG’s claims are barred by res judicata.

We have jurisdiction under 28 U.S.C. § 1291 from the final order of the district court granting summary judgment for defendants. After such a final order, the district court’s earlier denial of the motion to remand for lack of subject matter jurisdiction also is reviewable. *See Geruschat v. Ernst Young LLP (In re Seven Fields Dev. Corp.),*505 F.3d 237, 244-45 (3d Cir.2007); *see also*14C *489Charles Alan Wright, Arthur R. Miller & Edward H. Cooper, Federal Practice and Procedure § 3740 & n. 66 (3d ed.1998). We review the district court’s legal conclusions regarding subject matter jurisdiction, including a denial of a motion to remand, *de novo. E.g., Vill. of DePue v. Exxon Mobil Corp.,*537 F.3d 775, 782 (7th Cir.2008). And, of course, we review the district comb’s grant of summary judgment *de novo*as well. *E.g., Woodruff v. Peters,*482 F.3d 521, 526 (D.C.Cir.2007).

II.

CHG insists the district court erred in exercising jurisdiction over this case under 28 U.S.C. § 1334(b), which provides “the district courts shall have original but not exclusive jurisdiction of all civil proceedings arising under title 11, or arising in or related to cases under title 11.” “[Pjroceedings or claims arising in Title 11 are those that are not based on any right expressly created by Title 11, but nevertheless, would have no existence outside of the bankruptcy.” *Grausz v. Englander,*321 F.3d 467, 471 (4th Cir.2003) (internal quotations omitted).

 In concluding it had “arising in” jurisdiction, the district court principally relied on two cases: *Southmark Corp. v. Coopers & Lybrand (In re Southmark Corp.),*163 F.3d 925 (5th Cir.1999) and *Genischat,*505 F.3d 237. Each holds there is federal bankruptcy jurisdiction over malpractice claims brought by debtors against court-appointed professionals arising while the professionals assisted the debtor and the court during the bankruptcy process. *Southmark Corp.,*163 F.3d at 932; *Geruschat,*505 F.3d at 260-62. As the Fifth Circuit observed, “[a] *sine qua non*in restructuring the debtor-creditor relationship is the court’s ability to police the fiduciaries, ... [including] court-appointed professionals, who are responsible for managing the debtor’s estate in the best interest of creditors.” *Southmark Corp.,*163 F.3d at 931. After all, “[t]he bankruptcy court must be able to assure itself and the creditors who rely on the process that court-approved managers of the debtor’s estate are performing their work, conscientiously and cost-effectively.” *Id.*Moreover, “[ejxcessive professional fees or fees charged for mediocre or, worse, phantom work also cause the estate and the creditors to suffer.” *Id.*

Appellant argues that claims arising post-petition and post-plan-confirmation are outside the “arising in” jurisdiction of the court, citing *Valley Historic Limited Partnership v. Bank of New York,*486 F.3d 831 (4th Cir.2007), and *Community Bank of Homestead v. Boone (In re Boone),*52 F.3d 958 (11th Cir.1995). Rejecting a similar argument, the Fifth Circuit in *Southmark Corporation*specifically distinguished cases not implicating a “malpractice claim involving court-appointed professionals” but rather involving claims that “could stand alone from the bankruptcy case.” 163 F.3d at 931. The two cases appellant cites are distinguishable for the same reason. The claim at issue in *Community Bank of Homestead*was not a malpractice claim against professionals involved in the bankruptcy proceeding but rather was against a bank that allegedly had tortiously interfered with the sale of the debtors’ house. 52 F.3d at 959-60. In *Valley Historic Limited Partnership,*similarly, the claims at issue were not against bankruptcy professionals, but rather were tort claims against the bank that held the mortgage on the corporate debtor’s real estate assets. 486 F.3d at 834.

In sum, we agree with our sister circuits that malpractice claims against court-appointed professionals stemming from services provided in the bankruptcy proceeding are “inseparable from the bankruptcy context,” *Southmark Corp.,*163 F.3d at *490931, and “constitute ... a proceeding ‘arising in’ the bankruptcy,” *Geruschat,*505 F.3d at 263. Such claims therefore fall within the bankruptcy jurisdiction of the federal courts.

III.

CHG argues res judicata should not bar it from pressing its malpractice claims against Shaw Pittman despite the fee litigation during the bankruptcy proceedings. “Under the doctrine of res judicata, or claim preclusion, a subsequent lawsuit will be barred if there has been prior litigation (1) involving the same claims or cause of action, (2) between the same parties or their privies, and (3) there has been a final, valid judgment on the merits, (4) by a court of competent jurisdiction.” *Smalls v. United States,*471 F.3d 186, 192 (D.C.Cir.2006).

CHG’s arguments go to the first element listed, the so-called “identity” element; the existence of the other three elements is not contested. As the district court explained, “there is an identity of the causes of action when the cases are based on the ‘same nucleus of facts’ because ‘it is the facts surrounding the transaction or occurrence which operate to constitute the cause of action, not the legal theory on which a litigant relies.’ ” *Capitol Hill Group,*574 F.Supp.2d at 149 (quoting *Page v. United States,*729 F.2d 818, 820 (D.C.Cir.1984)). Put a little more pithily, “claim preclusion precludes the litigation of *claims,*not just *arguments.” NRDC v. EPA,*513 F.3d 257, 261 (D.C.Cir.2008); *see also id.*(“[C]laim preclusion is also intended to prevent litigation of matters that *should have been*raised in an earlier suit.”).

A.

The district court relied primarily on three cases in granting summary judgment for appellees under the doctrine of res judicata: *Grausz,*321 F.3d 467, *Iannochino v. Rodolakis (In re Iannochino),*242 F.3d 36 (1st Cir.2001), and *Osherow v. Ernst & Young LLP (In re Intelogic Trace, Inc.),*200 F.3d 382 (5th Cir.2000). In each, fee litigation in the bankruptcy proceeding precluded later malpractice claims against the bankruptcy professionals to whom the fees had been awarded. *Grausz,*321 F.3d at 475 (“[Debtor’s] legal malpractice claim is barred by the final fee order in the bankruptcy case.”); *Iannochino,*242 F.3d at 38 (“[A]n award of fees in bankruptcy to a debtor’s attorney will act as a bar under claim preclusion principles to a later suit filed by the debtor alleging professional malpractice arising from the bankruptcy representation.”); *Osherow,*200 F.3d at 388 (“[T]he award of professional fees and the ... malpractice claims concern ‘the same nucleus of operative facts’ and meet the transactional test.”).

CHG argues that, as in the Fourth Circuit’s unpublished decision in *Kronish Lieb Weiner & Heilman, LLP v. Fort,*197 Fed.Appx. 261 (4th Cir.2006) (unpublished), this case arises from a different nucleus of operative facts than the fee litigation, and therefore *Iannochino, Osherow,*and *Grausz*are inapposite. We disagree. In *Kronish,*the Fourth Circuit held a Consent Order resolving a bankruptcy claim for fees stemming from pre-petition legal services did not bar the trustee of the bankruptcy estate from bringing a malpractice action against the law firm. 197 Fed.Appx. at 264-65. Unlike in this case, there was no litigation before the bankruptcy court about the adequacy of the representation or the reasonableness of the fees; the claim was allowed and not contested by anyone. *Id.*at 264. Moreover, the legal services at issue took place prior to the filing of the bankruptcy petition. Because the claim was for pre-petition services, the bankruptcy court had no *491basis on which to evaluate the quality of the legal services. *Id.*As a result, the Fourth Circuit distinguished *Grausz,*its own precedent. *Id.*at 264 n. 2. In this case, however, there was an adversarial process before the bankruptcy court and the bankruptcy court was in a position to judge the quality of Shaw Pittman’s services. We look to *Grausz,*rather than *Kronish,*and thus agree with the district court that the fee applications and the malpractice claim arise out of the same nucleus of facts and the identity element of res judicata is satisfied.

B.

Res judicata may not bar a later suit where the plaintiff was not aware of its claim at the time of the first litigation. *See, e.g., Grausz,*321 F.3d at 473-74. CHG contends it had neither actual nor constructive knowledge of its claims during the bankruptcy fee litigation.

CHG insists it had no *actual*knowledge of Shaw Pittman’s failure to forward the BZA order until March 2005, and became aware of Shaw Pittman’s failure to make a particular legal argument on the parking issue in the “Spring of 2006.” CHG quickly goes on to assert, in the next paragraph of its brief, “therefore ... CHG had neither actual *nor constructive*knowledge.” But, of course, when CHG gained actual knowledge of specific claims tells us nothing about its actual or constructive knowledge of the operative facts.

The district court found CHG’s claims barred for two reasons: CHG (1) had actual knowledge of the general nature of its claims against Shaw Pittman, as evidenced by the arguments it did raise during the fee litigation, and (2) also had constructive knowledge. That is, CHG would have discovered the specifics of each of the two claims, had it acted with due diligence. *Capitol Hill Group,*574 F.Supp.2d at 150-51. “We look at the date the final fee order was entered ... and ask whether by that time [the debtor] knew or should have known there was a real likelihood that [it] had a malpractice claim.” *Grausz,*321 F.3d at 474. In April 2006, at the last hearing during the bankruptcy court fee litigation, the bankruptcy judge asked CHG whether it had any other claims against Shaw Pittman, and CHG’s counsel stated “[t]here are concerns that CHG has about the representation that Shaw Pittman provided during its representation of Capitol Hill Group that began in 1999 or whatever. But nothing’s been filed.” Moreover, at that same April 2006 hearing, counsel for Shaw Pittman and the bankruptcy judge each noted it was their understanding that future claims arising from the representation would be barred by res judicata. Following that warning and without objection from CHG, the bankruptcy judge announced the final conclusion of the fee litigation that same day.

“[R]es judicata ... bars relitigation not only of matters determined in a previous litigation but also ones a party could have raised[.]” *NRDC v. Thomas,*838 F.2d 1224, 1252 (D.C.Cir.1988). In April 2006, CHG was aware of Shaw Pittman’s failure to forward the written BZA order, and could have become aware of the failure to make the historic designation legal argument. As in the *Osherow*case, here CHG “was sufficiently aware of the real possibility of there being errors by [the bankruptcy professional] such as now alleged and of their likely consequences before the fee hearing.” 200 F.3d at 388. “[R]ather than considering whether the [debtors] knew of the precise legal contours of their malpractice claim at the time of the fee application, we must instead determine whether they knew of the factual basis of that claim.” *Iannochino,*242 F.3d at 48-49. When CHG decided to litigate Shaw Pittman’s fees, raising broad *492professional responsibility arguments questioning the representation, CHG’s duty to discover the legal errors (if any) committed by Shaw Pittman was triggered. As the First Circuit observed, “the breakdown of the attorney/client relationship here is further evidence that the [debtors] should have raised their malpractice claims as objections to the fee award.” *Id.*at 49. And as CHG was warned they would be, these claims are now precluded.1

C.

CHG also argues its claims, which it asserts were permissive rather than compulsory counterclaims, cannot be automatically precluded. The First Circuit has described the principle: the “failure to interpose a counterclaim does not necessarily act as a bar to later actions.” *Iannochino,*242 F.3d at 41. There are two “exceptions” which lead to a later action being barred by res judicata: (1) compulsory counterclaims may be barred, and (2) permissive counterclaims too may be barred when “the relationship between the counterclaim and the plaintiffs claim is such that the successful prosecution of the second action would nullify the initial judgment or impair the rights established in the initial action.” *Id.*at 42 (quoting Restatement (Second) of Judgments § 22(2)(b)). That is, res judicata may generally bar compulsory counterclaims, but not always permissive ones; otherwise res judicata would swallow Rule 13. But if allowing a permissive counterclaim to go forward would nullify the earlier judgment or impair rights established in the earlier action, even a permissive counterclaim can be barred.

In this case, we need not determine whether CHG’s claims against Shaw Pittman were permissive or compulsory counterclaims because they are barred under the second “exception” regardless. The bankruptcy judge repeatedly awarded fees to Shaw Pittman for the services rendered to CHG in connection with its bankruptcy proceedings, and the district court affirmed the awards. *E.g., In re Capitol Hill Group,*313 B.R. 344, 349-51 (D.D.C.2004) (rejecting CHG’s equitable breach of fiduciary duty/breach of professional conduct argument). As the district court noted in granting summary judgment, the bankruptcy judge also made oral findings that Shaw Pittman’s services were piofes-sional and that Shaw Pittman deserved to be compensated for those services. At the final hearing before the bankruptcy court, the judge informed CHG it “could have pursued claims against Shaw Pittman regarding the adequacy of its representation ... at the bankruptcy fee hearings but that it failed to do so and would therefore be barred from later asserting claims based on Shaw Pittman’s representation by the doctrine of res judicata.” *Capitol Hill Group, 574*F.Supp.2d at 147.

To allow CHG to litigate malpractice claims against Shaw Pittman now, based on the same representation, would nullify the initial judgment or impair the rights established by Shaw Pittman in the bankruptcy fee litigation. Unlike in regular civil litigation, “[i]n bankruptcy ... a successful malpractice action could impair rights that [the bankruptcy professionals] had gained from the order awarding them fees. Under the relevant section of the bankruptcy code governing fee awards, a finding of malpractice would mean that the attorneys were not entitled to compensation for those services found to be sub*493standard.” *Iannochino,*242 F.3d at 42-43 (internal citation omitted); *see Southmark Corp.,*163 F.3d at 931 (“Award of the professionals’ fees and enforcement of the appropriate standards of conduct are inseparably related functions of bankruptcy courts.”).

IV.

The judgment of the district court is

*Affirmed.*

1

. CHG also argues there are disputed issues of material fact as to its knowledge, precluding summary judgment. Because the district court accepted CHG's assertions with respect to the dates on which it gained actual knowledge, and charged CHG with constructive knowledge, there are no factual disputes in this case precluding summary judgment.