                                                       United States Court of Appeals
                                                                Fifth Circuit
                                                             F I L E D
                  UNITED STATES COURT OF APPEALS
                           FIFTH CIRCUIT                     August 23, 2005

                                                         Charles R. Fulbruge III
                                                                 Clerk
                           No. 04-30782


               KANSAS CITY SOUTHERN RAILWAY COMPANY,

                                              Plaintiff-Appellant,

                              versus

          CANADIAN NATIONAL/ILLINOIS CENTRAL RAILROAD,

                                               Defendant-Appellee.


          Appeal from the United States District Court
              for the Eastern District of Louisiana
                        (2:03-CV-3064-T)


Before HIGGINBOTHAM, BARKSDALE, and CLEMENT, Circuit Judges.

PER CURIAM:*

     Kansas City Southern Railway (KCS) appeals the dismissal, for

lack of subject matter jurisdiction, of its claims for indemnity

against Canadian National/Illinois Central Railroad (CN/IC). In an

earlier action by two KCS employees against KCS and CN/IC, and

following arbitration involving KCS and CN/IC and concerning the

tort claims brought by those employees, the district court held it

lacked subject matter jurisdiction over KCS’ claims against CN/IC.

These claims are presented again in this action. KCS contends they

are not subject to the prior arbitration.   CN/IC counters that the


     *
       Pursuant to 5TH CIR. R. 47.5, the court has determined that
this opinion should not be published and is not precedent except
under the limited circumstances set forth in 5TH CIR. R. 47.5.4.
district court’s holding in the earlier action – not appealed by

KCS – is controlling.           The district court held correctly that, in

accordance    with     its      prior    holding,        it   must    continue     to    hold

jurisdiction is lacking.             AFFIRMED.

                                              I.

     This    dispute       arises      out    of    a    collision     at    the   “Orleans

Junction” in Kenner, Louisiana, between a KCS locomotive and a

Burlington Northern Santa Fe (BNSF) detour train, operated by CN/IC

employees, on tracks owned by CN/IC.                    Two KCS employees, Crump and

Lentz, were seriously injured.                  They sued KCS under the Federal

Employee Liability Act, 45 U.S.C. § 51 et seq. (2000), and brought

negligence and other tort claims against CN/IC and BNSF (the Crump

and Lentz action).         As demanded by CN/IC, BNSF agreed to indemnify

CN/IC in that action, according to a “Detour Agreement” between the

two railroads.         (The district court later dismissed BNSF with

prejudice    from    the     Crump      and    Lentz      action.)      CN/IC      accepted

indemnity from BNSF; it is not involved in the instant action.

     CN/IC also demanded indemnity from KCS in the Crump and Lentz

action,     pursuant       to    the     Joint          Facilities     Agreement        (JFA)

controlling the CN/IC and KCS relationship.                           When KCS refused,

CN/IC invoked       Section       17    of    the   JFA,      which   required      binding

arbitration     in      case       of        disagreement       over        the    parties’

responsibilities.




                                               2
     Pending arbitration, KCS and CN/IC agreed to mediate the Crump

and Lentz claims; by oral agreement, each consented to fund one

half of any settlement reached, reserving rights under the JFA in

arbitration.      On 3 July 2002, based on a mediated settlement, the

district court dismissed without prejudice all claims in the Crump

and Lentz action, retaining jurisdiction and allowing either party

to reopen the action to enforce the settlement.            Pursuant to their

agreement, CN/IC and KCS contributed equally to the settlement.

     Arbitration was held on 19 July 2002, approximately two weeks

after the claims in the Crump and Lentz action were dismissed

(pursuant    to   the   settlement).       The   sole   issue   presented   at

arbitration by CN/IC was whether the JFA required KCS to indemnify

CN/IC   in   that    action.   KCS     did   not   present   any   claims   at

arbitration.        The arbitration panel held CN/IC could not claim

indemnity from KCS under the JFA because BNSF had agreed to

indemnify CN/IC under a separate agreement.             The panel concluded:

             [T]he language used by the parties in the
             [JFA] expresses an intent that neither party
             shall be liable to indemnify the other party
             for any loss or damage that a third party
             railroad that is allowed to enter or permitted
             to use a portion of the joint facilities is
             obligated to assume pursuant to an agreement
             with its host, regardless of whether the
             third-party railroad is using the facilities
             under another Joint Facilities Agreement,
             under a detour agreement or on some other
             basis. For that reason, KCS is not responsible
             to indemnify CN/IC for an obligation that BNSF
             has assumed pursuant to the Detour Agreements.




                                       3
The panel neither made a liability determination for the underlying

accident nor discussed CN/IC’s responsibility to KCS.

     Following the arbitration ruling against CN/IC, KCS demanded

CN/IC reimburse it for KCS’ contribution to the Crump and Lentz

settlement.   When negotiations between the parties failed, KCS

moved the district court to reopen the Crump and Lentz action to

“resolve the issue of any negligence on the part of KCS which would

entitle CN/IC to contribution”.       In August 2003, the motion was

denied.   The court held it did not have jurisdiction over KCS’

claims because the JFA arbitration clause required all issues to be

arbitrated; and KCS had not moved to amend the order of dismissal

evidencing the parties’ agreement to settle all claims without

reservation. Crump v. Can. Nat’l/Ill. Cent. R.R. Co., No. 01-0296,

2003 WL 21999334 (E.D. La. 19 Aug. 2003) (unpublished).      KCS did

not appeal this decision. (Neither party disputes this was a final

appealable order.)

     In October 2003, less than three months after the district

court refused to reopen the Crump and Lentz action, KCS brought the

instant action against CN/IC, again seeking reimbursement for its

settlement contribution, as well as attorney’s fees.     (Other than

stating a damages amount, the complaint is essentially identical to

the earlier, denied motion to reopen.)       KCS’ complaint claimed:

“the losses and damages incurred by Crump and Lentz were due solely

and exclusively to the fault of CN/IC”; the arbitration panel found


                                  4
“CN/IC was not entitled to a defense and indemnification from KCS

under   the   [JFA]     for    the   claims   asserted       against    it”;   and,

therefore, CN/IC was obliged to reimburse KCS for its settlement

contribution.

     CN/IC moved to dismiss for lack of subject matter jurisdiction

and improper venue under Federal Rules of Civil Procedure 12(b)(1)

and (b)(3), maintaining:         the indemnification dispute was subject

to   arbitration       under   the   JFA;     the    prior      indemnity   ruling

constituted      res   judicata,     based    on    the   binding      arbitration

agreement; and res judicata also barred the complaint because, in

denying KCS’ motion to reopen in the earlier Crump and Lentz

action, the district court held it lacked jurisdiction over these

issues.

     On granting the motion to dismiss, the district court ruled:

in the earlier arbitration, KCS should have presented a claim that

CN/IC     owed    it     indemnification;          and    KCS     forfeited    any

indemnification claim after the dismissal of the Crump and Lentz

action and the close of the arbitration hearing.                 In its analysis,

the district court quoted its 13 August 2003 denial of the motion

to reopen the Crump and Lentz action and held:               “The same analysis

holds true in the current dispute and, thus, this Court finds it is

without jurisdiction to hear these previously decided issues”.

Kansas City S. Ry. Co. v. Can. Nat’l/Ill. Cent.                 R.R. Co., No. 03-

3064, 2004 WL 1638115, at *5 (E.D. La. 20 July 2004) (unpublished).


                                        5
(The district court did not reach the issue of indemnity or any res

judicata effect of the arbitration agreement on KCS’ claims, other

than, as stated, to note KCS “could have and should have” raised

these claims in the arbitration.           Id.)   The district court did not

reach CN/IC’s improper-venue claim.

                                   II.

      Because the dismissal for lack of jurisdiction is the only

issue presented, we do not consider the improper-venue motion.               A

lack-of-subject-matter-jurisdiction dismissal is reviewed de novo,

e.g., Krim v. pcOrder.com, Inc., 402 F.3d 489, 493 (5th Cir. 2005),

as is the res judicata effect of a prior judgment, Davis v. Dallas

Area Rapid Transit, 383 F.3d 309, 313 (5th Cir. 2004).

      KCS contends:     the district court erred in concluding the

question of CN/IC’s duty to indemnify KCS was within the scope of

the   arbitration;    KCS’   indemnity        rights   were   not   ripe   for

arbitration; and those rights were not the proper subject of

arbitration because those proceedings were not meant to assign

liability for the accident.      KCS requests either reversal of the

district court’s order or a return to arbitration to address KCS’

indemnity rights.

      CN/IC responds:   the district court’s denial of the motion to

reopen the Crump and Lentz action was a final, controlling ruling

on the subject-matter-jurisdiction issue and stands as res judicata

to    the   instant   action;   KCS’       assertion    of    subject   matter

                                       6
jurisdiction is barred by collateral estoppel; res judicata also

bars KCS’ indemnity claim because it should have been addressed at

arbitration; and the appropriate remedy was for KCS to appeal the

denial of the motion to reopen the Crump and Lentz action, not file

the instant action.

     KCS replies that CN/IC cannot assert the affirmative defenses

of res judicata or collateral estoppel because it did not do so in

its motion     to    dismiss;   and   that    collateral     estoppel   and   res

judicata do not apply because the issue of KCS’ indemnity was not

raised or litigated in the prior arbitration or district court

proceedings.

     The district court ruled correctly.               In so holding, we do not

decide, inter alia, whether the parties may return to arbitration.

                                       A.

                                       1.

     Generally, res judicata is an affirmative defense which must

be raised in a party’s first responsive pleading.                 FED. R. CIV. P.

8(c); e.g., Nagle v. Lee, 807 F.2d 435, 438 (5th Cir. 1987).               CN/IC

did not answer KCS’ complaint; instead, pursuant to Rule 12(b)

(party may raise lack-of-subject-matter-jurisdiction defense by

motion), its first responsive pleading was its motion to dismiss,

in which it properly asserted res judicata concerning subject

matter jurisdiction and indemnity.             See Nagle, 807 F.2d at 439.

Apparently,    the    district   court       adopted    CN/IC’s   res   judicata

                                       7
contention when it held “it [was] without jurisdiction to hear

these previously decided issues”. Kansas City, 2004 WL 1638115, at

*5.

      In any event, this matter fits both exceptions for addressing

res judicata sua sponte.      A court may do so “in the interest of

judicial economy when [,as here,] both actions were brought before

the same court”.     Mowbray v. Cameron County, Tex., 274 F.3d 269,

281 (5th Cir. 2001), cert. denied, 535 U.S. 1055 (2002) (citing

Boone v. Kurtz, 617 F.2d 435, 436 (5th Cir. 1980)).        Also, “where

all of the relevant facts are contained in the record ... and all

are uncontroverted”, a court “may not ignore their legal effect,

nor may [it] decline to consider the application of controlling

rules of law to dispositive facts, simply because neither party has

seen fit to invite [the court’s] attention by technically correct

and exact pleadings”.      Id. at 281 (citing Am. Furniture Co. v.

Int’l Accommodations Supply, 721 F.2d 478, 482 (5th Cir. Unit A

Mar. 1981)).   KCS’ motion to reopen the Crump and Lentz action and

KCS’ instant action concern CN/IC’s responsibility vel non to

indemnify KCS, and they were brought before the same court.          The

underlying   facts   are   uncontroverted;   and   the   district   court

previously, conclusively held it lacks jurisdiction over KCS’

indemnity claims.




                                   8
                                  2.

       A prior judgment acts as res judicata to preclude further

consideration when: “(1) ... the prior judgment [was] rendered by

a court of competent jurisdiction; (2)... there [was] a final

judgment on the merits; (3) ... the parties, or those in privity

with them, [were] identical in both suits; and (4) ... the same

cause of action [was] involved in both suits”.      Mowbray, 274 F.3d

at 282 (internal quotation omitted).       “It has long been the rule

that    principles   of   res   judicata   apply   to   jurisdictional

determinations – both subject matter and personal.”      Ins. Corp. of

Ir., Ltd. v. Compagnie des Bauxites de Guinee, 456 U.S. 694, 702

n.9 (1982).

       In denying KCS’ motion to reopen the Crump and Lentz action,

the district court ruled it lacked subject matter jurisdiction over

KCS’ indemnity claim because that claim was covered by the binding

arbitration agreement in the JFA.      Crump, 2003 WL 21999334, at *2

(“The arbitration clause requires all claims to be arbitrated.”).

This was a final determination of the court’s subject matter

jurisdiction for this claim; rendered by a court of competent

jurisdiction; involving the same parties and the same claim as the

current action.

       “If the parties against whom judgment was rendered did not

appeal, the judgment becomes final and the court’s subject matter

jurisdiction is insulated from collateral attack.”      Royal Ins. Co.


                                   9
of Am. v. Quinn-L Capital Corp., 960 F.2d 1286, 1293 (5th Cir.

1992), cert. denied, 511 U.S. 1032 (1994).           As discussed, KCS did

not appeal the denial of its motion to reopen the Crump and Lentz

action; it may not now re-litigate subject matter jurisdiction.

                                     B.

     In general, “the dismissal of a complaint for lack of [subject

matter] jurisdiction does not adjudicate the merit[s] so as to make

the case res judicata on the substance of the asserted claim”.

Boone, 617 F.2d at 436 (emphasis added); see also Home Builders

Ass'n of Miss., Inc. v. City of Madison, Miss., 143 F.3d 1006, 1013

(5th Cir. 1998).   As discussed, because the district court held in

a   previous,   final    decision   that    it   lacked      subject   matter

jurisdiction over KCS’ indemnity claim against CN/IC for damages

arising from the Crump and Lentz action, it held it was without

jurisdiction    over    the   instant   complaint.      In    upholding   the

dismissal, we decide neither the merits of the indemnity issue nor

whether the parties may return to arbitration to resolve them.

                                    III.

     For the foregoing reasons, the judgment is

                                                                AFFIRMED.




                                     10
