
    C.H. ROBINSON WORLDWIDE, INC.; C.H. Robinson Company, Inc.; C.H. Robinson Company, Plaintiffs-Appellants v. George LOBRANO, Jr., Defendant-Appellee. C.H. Robinson Worldwide, Inc.; C.H. Robinson Company, Inc.; C.H. Robinson Company, Plaintiffs-Appellees v. George Lobrano, Jr., Defendant-Appellant.
    Nos. 11-2777, 11-2893.
    United States Court of Appeals, Eighth Circuit.
    Submitted: May 17, 2012.
    Filed: Oct. 3, 2012.
    
      Shannon M. McDonough, argued, Donald Chance Mark, Jr., Peter A.T. Carlson, on the brief, Eden Prairie, MN, for Appellant/Cross-Appellee.
    Sarah A. Horstmann, argued, Minneapolis, MN, William Zane Pentelovitch, Minneapolis, MN, Michael D. Lowe, S. Price Barker, Shreveport, LA, on the brief, for Appellee/Cross-Appellant.
    Before LOKEN and BEAM, Circuit Judges, and PERRY, District Judge.
    
      
      . The Honorable Catherine D. Perry, Chief Judge, United States District Court for the Eastern District of Missouri.
    
   BEAM, Circuit Judge.

After receiving a favorable judgment in a prior proceeding, George Lobrano, Jr., moved to dismiss Appellants’ complaint in the present action on the basis of res judicata. Lobrano also filed a motion requesting sanctions and attorney’s fees. The district court granted the motion to dismiss but declined to impose sanctions or award attorney’s fees. Appellants now appeal the dismissal, and Lobrano cross-appeals the district court’s judgment on sanctions and attorney’s fees. We affirm both rulings.

1. BACKGROUND

A. Factual History

This dispute arises out of an employment contract between Lobrano and his employer, C.H. Robinson Worldwide, Inc.; C.H. Robinson Company, Inc.; and C.H. Robinson Company (collectively, C.H. Robinson). In 2005, C.H. Robinson promoted Lobrano to a management position in its Shreveport, Louisiana office. The parties executed a “Management-Employee Agreement” (“Employee Agreement”) as part of Lobrano’s promotion. Minnesota law governed the Employee Agreement and a choice-of-venue clause required litigation to be initiated in Hennepin County, or the United States District Court for the District of Minnesota. Among other terms, the Employee Agreement contained several provisions imposing restrictive covenants. A noncompete provision precluded Lobrano from engaging in any business activity that competed with C.H. Robinson for two years after Lobrano left its employment. The territorial reach of the provision extended to the entire continental United States. In consideration for the noncompete, the Employee Agreement provided that Lobrano would be eligible to receive “equity grants” made by C.H. Robinson’s management under its 1997 Omnibus Stock Plan and any successor plans.

Appellants’ complaint alleges that “[a]s a direct result of [Lobrano’s] execution of the [Employee Agreement], C.H. Robinson issued equity grants to [him] in exchange for ... [his] forbearance from working for a competitor.” On three occasions from December 7, 2005, to November 5, 2009, C.H. Robinson issued stock to Lobrano, totaling 9,714 shares. Restricted Stock Plans provided the vesting schedule for these equity grants. Because Lobrano agreed to a noncompete clause in the Employee Agreement, the Restricted Stock Plans granted Lobrano two additional years of vesting after he separated from C.H. Robinson.

Around August 2010, C.H. Robinson gave Lobrano the option of transferring from a management position to a senior sales position or accepting a severance package. Lobrano chose the former, but on October 27, 2010, he resigned from the position. Shortly thereafter, Lobrano approached C.H. Robinson, requesting that the geographic scope of the noncompete clause be modified so as to allow him to work for a competitor, J.B. Hunt. C.H. Robinson declined Lobrano’s request and litigation ensued over that matter.

B. Procedural History

On November 12, 2010, Lobrano commenced action in Louisiana state court seeking a judicial declaration that Louisiana law rendered the restrictive covenants void and unenforceable. C.H. Robinson removed the case to the United States District Court for the Western District of Louisiana (hereinafter the “Louisiana action”). On December 10, 2010, Lobrano moved for summary judgment and sought expedited consideration of the motion. The summary judgment hearing was set for January 25, 2011, and the district court denied the request for expedited consideration.

On December 21, 2010, C.H. Robinson commenced action in Minnesota state court and filed a motion for anti-suit injunction. Lobrano removed the case to the United States District Court for the District of Minnesota (hereinafter the “Minnesota action”), and moved to dismiss, stay, or transfer the suit. In response, C.H. Robinson sought a preliminary injunction to enjoin Lobrano from proceeding in the Louisiana action. Hearing was scheduled for January 21, 2011.

On January 7, 2011, before the scheduled summary judgment hearing, the district court in the Louisiana action rendered judgment on the merits, granting Lobrano’s motion for summary judgment. Applying Louisiana’s choice-of-law principles, the district court determined that it had to apply Louisiana law in deciding the validity of the noncompete provisions. And, pursuant to Louisiana law, the district court concluded that the noncompete provisions contained an overly broad geographic scope. Determining that it could not reform the geographic scope, the district court voided the noncompete provisions. Lobrano v. C.H. Robinson Worldwide, Inc., No. 10-cv-1775, 2011 WL 52602 (W.D.La. Jan. 7, 2011). C.H. Robinson never appealed this determination.

Following the court’s ruling in the Louisiana action, Lobrano amended his motion to dismiss in the Minnesota action, seeking dismissal on the grounds of the Full Faith and Credit Clause and Louisiana’s res judicata principles. C.H. Robinson then amended its complaint in the Minnesota action, deleting its claim for breach of the Employee Agreement and adding, among other claims, Count VI, which sought a declaration that, because the noncompete provisions were rendered void in the Louisiana action, Lobrano does not qualify for continued vesting under the 2008 and 2009 Restricted Stock Plans. In response to the amended complaint, Lobrano filed a motion to dismiss grounded in the Full Faith and Credit Clause, res judicata, and compulsory counterclaim rules. On March 14, 2011, Lobrano moved for sanctions and attorney’s fees, arguing that C.H. Robinson ignored well-settled res judicata principles in pursuing the Minnesota action.

The Minnesota district court granted Lobrano’s motion to dismiss, concluding that the Louisiana judgment precluded the Minnesota action on the basis of res judicata, and that the Minnesota action should have been brought as a compulsory counterclaim in the Louisiana action. However, finding C.H. Robinson’s legal arguments “colorable,” the district court declined to impose sanctions or award attorney’s fees to Lobrano. C.H. Robinson appeals the dismissal of Count VI of its amended complaint, and Lobrano cross-appeals the adverse ruling on sanctions and attorney’s fees.

II. DISCUSSION

Two issues are currently before the court. First, we must decide whether the district court properly determined that res judicata precluded Count VI of C.H. Robinson’s amended complaint in the Minnesota action. If res judicata precluded this claim, the second question is whether C.H. Robinson should have been subject to sanctions and/or attorney’s fees for pursuing the Minnesota action.

“We review de novo the district court’s grant of a motion to dismiss for failure to state a claim based on res judicata.” Laase v. Cnty. of Isanti, 638 F.3d 853, 856 (8th Cir.2011). We review the denial of a motion for sanctions for an abuse of discretion, affording the district court substantial deference and finding an abuse of discretion only if the court “bases its ruling on an erroneous view of the law or a clearly erroneous assessment of the evidence.” Monarch Fire Prot. Dist. of St. Louis Cnty., Mo. v. Freedom Consulting & Auditing Servs., Inc., 644 F.3d 633, 639 (8th Cir.2011).

A. Raising Res Judicata Through a Motion to Dismiss

C.H. Robinson makes a threshold argument that res judicata is not an appropriate defense to raise in a motion to dismiss. Our precedent counsels otherwise.

Res judicata is an affirmative defense. Howard v. Green, 555 F.2d 178, 181 (8th Cir.1977); Fed.R.Civ.P. 8(c)(1). Before adoption of the Federal Rules of Civil Procedure, we recognized “that a defense of res judicata” may be raised in a motion to dismiss when “the identity of the two actions can be determined from the face of the petition itself.” Potamitis v. Pittsburgh Plate Glass Co., 82 F.2d 472, 473 (8th Cir.1936). And under the Federal Rules, we have implicitly endorsed the use of a motion to dismiss to raise res judicata. See, e.g., Laase, 638 F.3d at 856 (reciting standard of review on “a motion to dismiss for failure to state a claim based on res judicata”). Indeed, “[i]f an affirmative defense ... is apparent on the face of the complaint ... that [defense] can provide the basis for dismissal under Rule 12(b)(6).” Noble Sys. Corp. v. Alorica Cent., LLC, 543 F.3d 978, 983 (8th Cir.2008). Our interpretation of the phrase “face of the complaint ... includefs] public records and materials embraced by the complaint,” id., and “materials] attached to the complaint,” Quinn v. Ocwen Federal Bank FSB, 470 F.3d 1240, 1244 (8th Cir.2006) (per curiam) (quotation omitted).

Here, the complaint, with its attachments, provided sufficient bases for a res judicata defense on a motion to dismiss. C.H. Robinson’s complaint contains several allegations concerning the order and judgment in the Louisiana action, the Employee Agreement, and the Restricted Stock Plans. Each one of these documents is also attached to the complaint. Given that these materials reveal the applicability of res judicata to this case, we conclude the district court properly decided the merits of Lobrano’s res judicata defense on a motion to dismiss.

B. Res Judicata Merits

“The law of the forum that rendered the first judgment controls the res judicata analysis.” Laase, 638 F.3d at 856 (quotation omitted). Here, the United States District Court for the Western District of Louisiana, exercising its diversity jurisdiction, rendered the first judgment. As a matter of federal common law, we must give that federal diversity judgment the same claim-preclusive effect that Louisiana state courts would give to a state court judgment. Semtek Int’l., Inc. v. Lockheed Martin Corp., 531 U.S. 497, 508, 121 S.Ct. 1021, 149 L.Ed.2d 32 (2001). Thus, we apply Louisiana’s res judicata rules to this action.

“Louisiana Revised Statute 13:4231 embraces the broad usage of the phrase ‘res judicata’ to include both claim preclusion (res judicata) and issue preclusion (collateral estoppel).” Certified Fin., Inc. v. Cunard, 838 So.2d 1, 4 (La.Ct.App.2002). “[U]nlike issue preclusion, claim preclusion is much broader, encompassing a prohibition against relitigation of those matters which, not only, were litigated but, also, of those which could have been litigated.” Williams v. City of Marksville, 839 So.2d 1129, 1131 (La.Ct.App.2003). In Louisiana, a prior judgment has a claim preclusive effect if:

(1) the judgment is valid; (2) the judgment is final; (3) the parties are the same; (4) the cause or causes of action asserted in the second suit existed at the time of final judgment in the first litigation; and (5) the cause or causes of action asserted in the second suit arose out of the transaction or occurrence that was the subject matter of the first litigation.

Burguieres v. Pollingue, 843 So.2d 1049, 1053 (La.2003); La.Rev.Stat. § 13:4231 The parties only dispute elements four and five.

1. Cause of Action Existed at the Time of First Judgment

Count VI of C.H. Robinson’s amended complaint in the Minnesota action sought a declaration that, as a result of the Louisiana judgment, Lobrano did not continue vesting under the 2008 and 2009 Restricted Stock Plans. “Implicit in the concept of res judicata is the principle that a party had the opportunity to raise a claim in the first adjudication, but failed to do so.” Maschek v. Cartemps USA 896 So.2d 1189, 1193 (La.Ct.App.2005). “A cause of action which arose after the rendition of the final judgment could not have been asserted earlier and would not be precluded by the judgment.” La.Rev.Stat. § 13:4231 cmt. (e). C.H. Robinson argues that Count VI in the Minnesota action did not arise until the Louisiana court rendered judgment on the restrictive covenants. We disagree.

Once Lobrano sought nullification of the restrictive covenants, by a Louisiana court, C.H. Robinson had the clear opportunity to have the court determine the contractual consequences that would flow from a ruling in Lobrano’s favor. Significantly, at the time Lobrano sought declaratory relief, the only event that had yet to occur was the judgment in Lobrano’s favor and this alone is not enough to allow C.H. Robinson to avoid instituting Count VI in the Louisiana action. See Wright, Miller & Kane, Federal Practice and Procedure § 1411 (3d ed. 2010).

C.H. Robinson argues that the district court has created an “unattainable burden” of anticipatory pleading by requiring a pleader to “attempt to anticipate and plead any and all possible causes of action.” Further, C.H. Robinson complains that this anticipatory pleading required it to seek nullification of its own agreement — the actual relief Lobrano sought. But Federal Rule of Civil Procedure 8(d) explicitly contemplates this type of hypothetical alternative pleading. When Lobrano sought in the Louisiana action “a judgment declaring the restrictive covenants ... null, void, and unenforceable,” C.H. Robinson needed to recognize the very real possibility that the covenants would be declared unenforceable and plead accordingly, including the assertion of Count VI as a counterclaim. Therefore, we conclude that Count VI of C.H. Robinson’s amended complaint existed at the time of the Louisiana judgment.

2. Same Transaction or Occurrence

The “central inquiry” under Louisiana res judicata law “is whether the second action asserts a cause of action which arises out of the transaction or occurrence that was the subject matter of the first action.” Burguieres, 843 So.2d at 1053. “All logically related events entitling a person to institute legal action against another generally are regarded as comprising a ‘transaction or occurrence.’ ” Hy-Octane Invs., Ltd. v. G & B Oil Prods., Inc., 702 So.2d 1057, 1060 (La.Ct.App.1997). We examine the underlying facts of the dispute to determine if the subsequent cause of action arose out of the same transaction or occurrence as the first cause of action. Holly & Smith Architects, Inc. v. St. Helena Congregate Facility, 872 So.2d 1147, 1152 (La.Ct.App.2004).

“What factual grouping' constitutes a ‘transaction’, and what groupings constitute a ‘series’ [of transactions], are to be determined pragmatically, giving weight to such considerations as whether the facts are related in time, space, origin, or motivation, whether they form a convenient trial unit, and whether them treatment as a unit conforms to the parties’ expectations or business understanding or usage.”

N. Am. Treatment Sys., Inc. v. Scottsdale Ins. Co., 943 So.2d 429, 440 (La.Ct.App.2006) (emphasis omitted) (quoting Restatement (Second) of Judgments § 24 (1982)). To determine if the Minnesota action arose out of the same transaction or occurrence as the Louisiana action, we examine the Louisiana decision and the factual predicate giving rise to that action. See Chevron U.S.A, Inc. v. State, 993 So.2d 187, 195 (La.2008).

Lobrano sought a declaratory judgment in Louisiana state court that the restrictive covenants were “null, void, and unenforceable.” After C.H. Robinson removed the case, the Louisiana federal court, applying Louisiana choice-of-law principles, disregarded the Employee Agreement’s choice-of-law provision and applied Louisiana substantive law to Lobrano’s claim, concluding that “application of Minnesota law would significantly impair the policies of Louisiana in protecting its employees from restrictions on the common right to work.” (That is a eustomary choice-of-law ruling in restrictive covenant litigation, where the laws of various states differ significantly in their willingness to enforce such restrictions.) On the merits, the Louisiana court then granted Lobrano the broad remedy he sought, declaring the Agreement’s restrictive covenants “null and void,” not merely unenforceable in Louisiana.

We decline to adopt Lobrano’s broad assertion that the Louisiana action and the Minnesota action arose out of the same transaction or occurrence because both “arose out of the Employee Agreement” and its restrictive covenants. Rather, it is sufficient to conclude that Count VI arose out of the only “transaction or occurrence” that Lobrano presented to the Louisiana court — whether, under Louisiana law and public policy, the Agreement’s restrictive covenants precluded Lobrano, a Louisiana resident, from working for a C.H. Robinson competitor. The claim asserted by C.H. Robinson in Claim VI — that Lobrano “does not qualify for continued vesting” under the Restricted Stock Programs “because of the Louisiana Court’s Order of January 7, 2011 nullifying the restrictive covenants” — not only “arose out of the Employee Agreement,” it arose out of the specific relief Lobrano sought in the Louisiana action. Accordingly, the two suits have more than the simple “factual overlap” that was held to be insufficient to constitute a common transaction or occurrence in Scottsdale, 943 So.2d at 441. Rather, the relief sought by Lobrano in the Louisiana action “create[d] a logical relationship in the subject matter of the two suits such that there can be little doubt that the two proceedings result from the same transaction or occurrence.” Travcal Props., LLC v. Logan, 49 So.3d 466, 471 (La.Ct.App.2010).

C. Sanctions

Lobrano unsuccessfully moved for sanctions and attorney’s fees under Federal Rule of Civil Procedure 11 and 28 U.S.C. § 1927. On appeal, Lobrano maintains that sanctions and attorney’s fees were appropriate in this case because C.H. Robinson ignored well-settled principles of res judicata.

On prior occasions we have deemed it necessary to impose sanctions on an offending party for failing to properly consider res judicata principles. For example, in Professional Management Associates, Inc. v. KPMG LLP, we reversed and remanded for the imposition of sanctions where a plaintiff attempted to re-litigate the same claims involving the same parties as a previous action. 345 F.3d 1030, 1032-33 (8th Cir.2003) (per curiam). The plaintiff even admitted that the complaint in the second suit was simply a copy of a proposed amended complaint in the first suit, which had been denied. Id. at 1032. Because res judicata law was “well-settled” under the circumstances, and “a reasonable inquiry into the lawsuit’s basis show[ed] res judicata bar[red] the action,” we concluded sanctions should have been imposed. Id. at 1032.

Lobrano also draws our attention to Willhite v. Collins, 459 F.3d 866 (8th Cir.2006), to show sanctions are appropriate in this case. In Willhite, a party ignored prior, unsuccessful state court actions and commenced action in federal district court, raising similar claims. Id. at 868. The district court sanctioned the offending attorney, finding that the attorney was “remiss in either neglecting to consider, or entirely disregarding, the doctrines of res judicata and collateral estoppel” and “no competent lawyer could reasonably believe there was a colorable or legally-supportable claim.” Id. at 870. Under the circumstances, we concluded that a sanction was appropriate in light of the attorney’s bad faith conduct. Id.

In the instant case, we are mindful of the piecemeal litigation C.H. Robinson created by maintaining the Minnesota action after the Louisiana judgment, but we defer to the district court on “fact-intensive, close calls” concerning sanctions. Clark v. United Parcel Serv., Inc., 460 F.3d 1004, 1010 (8th Cir.2006) (quotation omitted). C.H. Robinson initiated the Minnesota action before final judgment had been rendered in the Louisiana action, attempting to halt the proceedings in Louisiana. Once final judgment had been rendered in the Louisiana action, C.H. Robinson amended its complaint in the Minnesota action apparently attempting to avoid raising claims precluded by the Louisiana judgment. This conduct differs from that in KPMG, where the offending party used the identical complaint in the second action that had been the basis of the first judgment. And Willhite illustrates a far more obvious and egregious disregard of res judicata, where an attorney “and his clients had subjected the defendants to repeated litigation over matters that ha[d] been finally adjudicated”— commencing a fifth lawsuit on the same subject matter. 459 F.3d at 868 n. 1, 870 (internal quotation omitted). Moreover, contrary to Lobrano’s urging, we do not think principles of res judicata were so well-settled under the present circumstances so as to demand the imposition of sanctions. Therefore, applying our deferential standard, “the [district [cjourt’s decision to deny sanctions is not so far out of bounds as to justify our coming to a different conclusion at the appellate level.” O’Connell v. Champion Int'l. Corp., 812 F.2d 393, 395 (8th Cir.1987).

III. CONCLUSION

We affirm the judgment of the district court. 
      
      . The Honorable David S. Doty, United States District Judge for the District of Minnesota.
     
      
      . C.H. Robinson maintains that the district court erred in dismissing Counts I through V of the amended complaint, but only seeks review of Count VTs dismissal. Accordingly, we limit our review to Count VI.
     
      
      . Lobrano asserts that C.H. Robinson failed to raise this argument below, and thus it is waived. Although there is a serious possibility that C.H. Robinson failed, to preserve this argument below, we elect to address the issue. See United States v. Rickert, 685 F.3d 760, 764 n. 2 (8th Cir.2012) (electing to bypass the possibility that defendant waived right to appeal an issue and addressing merits).
     
      
      . Lobrano wrongly argues that Count VI "is precluded by the Full Faith and Credit Clause of the United States Constitution.” That Clause governs "the effects to be given only to state-court judgments.” Semtek, 531 U.S. at 507, 121 S.Ct. 1021.
     
      
      . There is good reason to question whether a declaratory judgment should broadly preclude all claims that existed at the time of the first judgment, which arguably arose out of the same transaction or occurrence, and therefore might have been asserted as counterclaims. See Allan Block Corp. v. County Materials Corp., 512 F.3d 912, 915-17 (7th Cir.2008). But here, the injury complained of in Count VI would arise only if Lobrano was awarded the declaratory relief he sought in the Louisiana action. Precluding C.H. Robinson from asserting that claim, which was inextricably interwoven with Lobrano's claim .for declaratory relief, is not unfair. In any event, C.H. Robinson did not argue that the elsewhere-recognized declaratory-judgment exception to claim preclusion applies, and therefore we need not further explore the applicability of the exception to this case.
     
      
      . If a Louisiana state court would have granted Lobrano that broad relief, it was appropriate for a federal court exercising diversity jurisdiction to afford him the same remedy. See Palmer & Cay, Inc. v. Marsh & McLennan Cos., 404 F.3d 1297, 1310 (11th Cir.2005).
     
      
      . Louisiana public policy, which drove the Louisiana court’s choice-of-law ruling, did not necessarily justify its broad, potentially extraterritorial remedy. Therefore, it is by no means clear that the broad decree should be given full claim-preclusive effect in a subsequent suit to enforce the covenants in another State whose public policy is less hostile to such restrictions. See Baker v. Gen. Motors Corp., 522 U.S. 222, 234-35, 118 S.Ct 657, 139 L.Ed.2d 580 (1998); Thomas v. Wash. Gas Light Co., 448 U.S. 261, 272, 100 S.Ct. 2647, 65 L.Ed.2d 757 (1980); Keener v. Convergys Corp., 342 F.3d 1264, 1269 (11th Cir.2003) (“Georgia cannot in effect apply its public policy decisions nationwide — the public policy of Georgia is not that everywhere.”); Rimkus Consulting Grp., Inc. v. Cammarata, 688 F.Supp.2d 598, 659 (S.D.Tex.2010); Hilb Rogal & Hobbs Co. v. Siech, No. HHDCVX04044034621A, 2010 WL 1050540, at *3-6 (Conn.Super.Ct. Feb. 16, 2010). This difficult question is not before us. As the district court wisely noted in the Order being appealed: “The validity of the restrictive covenants is not at issue in this action.”
     