
648 F.3d 242 (2011)
Timoteo CUEVAS; Eva Cuevas, Plaintiffs-Appellees,
v.
BAC HOME LOANS SERVICING, LP; Countrywide Home Loans of Texas Incorporated; Countrywide Home Loans, Incorporated, Defendants-Appellants.
No. 10-20735.
United States Court of Appeals, Fifth Circuit.
July 27, 2011.
*245 Christopher Douglas Collings, Collings Law Firm, P.L.L.C., Houston, TX, for Plaintiffs-Appellees.
David Stewart Clancy, Akerman Senterfitt, L.L.P., Dallas, TX, for Defendants-Appellants.
Before DAVIS, PRADO and OWEN, Circuit Judges.
PRADO, Circuit Judge:
Defendants-Appellants BAC Home Loans Servicing, LP (formerly known as Countrywide Home Loans Servicing, LP); Countrywide Home Loans of Texas, Incorporated; and Countrywide Home Loans, Incorporated appeal an order for remand. The district court dismissed the lone federal claim under the Truth in Lending Act ("TILA"), and declined to exercise supplemental jurisdiction over the remaining state law claims. The defendants argue that this was an abuse of discretion because Countrywide Home Loans of Texas was improperly joined and thus the district court had diversity jurisdiction over the state law claims. Plaintiffs-Appellees Timoteo and Eva Cuevas argue that there was no improper joinder and that the defendants waived any right to argue improper joinder or the existence of diversity jurisdiction when they failed to remove the action to federal court within thirty days of service of the original complaint that listed Countrywide Home Loans of Texas. The defendants disagree and argue that once the district court properly assumed removal jurisdiction over the federal claim, the exercise of diversity jurisdiction over the state law claims was mandatory.
We reverse and remand. The defendants carried their burden of proving improper joinder; the district court had diversity jurisdiction over the state law claims at the time of remand, and the exercise of that jurisdiction was mandatory.

I. FACTUAL AND PROCEDURAL BACKGROUND
The Cuevases are citizens and residents of Texas. BAC Home Loans Servicing, LP is a citizen of North Carolina, the state of citizenship of its limited partners. Countrywide Home Loans, Inc. is a New York corporation with its principal place of business in California. Countrywide Home Loans of Texas is a Texas corporation.
The Cuevases owned a home in Porter, Texas. They financed the purchase of their home using a loan from the defendants. On January 21, 2009, a Countrywide entity sent the Cuevases a letter informing them of their default and offering them the opportunity to cure the default by paying the amount owed, $4,173.48, by February 20, 2009. The Cuevases allege that they mailed a cashier's check for the full amount by the stated deadline, but that the defendants wrongfully refused to accept the tendered payment. The Cuevases allege that they continued to communicate with the defendants and made good-faith attempts to cure their default status, but that the defendants began foreclosure proceedings and sold the house without providing notice. The Cuevases further allege that the defendants purchased the home at the foreclosure sale *246 and subsequently offered to sell the Cuevases their own home at a profit.
On April 29, 2009, the Cuevases sued the defendants in Texas state court for wrongful foreclosure, alleging only state law claims under the Texas Deceptive Trade Practices Act ("DTPA"), the Texas Debt Collection Practices Act ("DCPA"), and a variety of common law theories including negligence, unreasonable collection efforts, fraud, fraudulent inducement, and slander of title. On December 18, 2009, the plaintiffs filed an amended petition raising a claim under the TILA, codified at 15 U.S.C. §§ 1601-1667f.
Despite the fact that the defendants were on notice as of April 29, 2009, that Countrywide Home Loans of Texas was listed as a defendant in the original petition, the defendants did not remove this case to federal district court until January 5, 2010. They removed the case to the federal court under federal question and diversity jurisdiction. They asserted that the district court had diversity jurisdiction because the amount in controversy exceeded $75,000 and because all of the parties in interest were diverse. The defendants argued that Countrywide Home Loans of Texas's presence in the lawsuit did not destroy diversity jurisdiction because that defendant was fraudulently joined. They asserted that the Cuevases had no reasonable possibility of recovering from Countrywide Home Loans of Texas because (1) all of the allegations in the petition arise from the servicing of the loans and Countrywide Home Loans of Texas never serviced the loans, and (2) Countrywide Home Loans of Texas was an inactive corporation at all times relevant to the litigation. On January 14, 2010, the defendants also filed a Rule 12(b)(6) motion to dismiss the Cuevases' amended petition for failure to state a claim upon which relief could be granted.
On January 20, 2010, the Cuevases filed a motion to remand. The Cuevases argued that the district court could not exercise removal jurisdiction based on diversity jurisdiction because (1) the defendants' notice of removal was not filed within thirty days of service of the original complaintthe date on which the defendants learned or should have learned that the Cuevases allegedly joined Countrywide Home Loans of Texas improperly; and (2) the defendants failed to carry their burden of proving the joinder was improper.
On September 27, 2010, the district court issued an opinion and order granting in part and denying in part the defendants' motion to dismiss and granting the Cuevases' motion to remand.[1] The district court first addressed whether it had removal jurisdiction. It held that it did not have removal jurisdiction based on diversity because the defendants had failed to prove improper joinder of Countrywide Home Loans of Texas. The district court found that Countrywide Home Loans of Texas was in existence and active for the purpose of originating loans and that the complaint did not distinguish between originating and servicing the home loan. *247 Consequently, the district court found that the defendants had failed to carry their burden of proving that there was no reasonable basis by which the Cuevas could recover against Countrywide Home Loans of Texas. Further, the district court found that the defendants' notice of removal under diversity jurisdiction was untimely because they failed to remove the case within thirty days of April 29, 2009, the date on which they were served with the Cuevases' original complaint listing Countrywide Home Loans of Texas as a party. The district court then held that it nevertheless had removal jurisdiction over the action because the complaint alleged a federal claim under TILA and the state law claims derived from a common nucleus of operative facts.
The district court then granted the defendants' Rule 12(b)(6) motion in part. The district court dismissed the TILA claim, finding that the Cuevases had failed to plead any facts to support it. Finally, having dismissed the federal claim, the district court declined to exercise supplemental jurisdiction over the state law claims and remanded the action to Texas state court. The defendants timely appealed the grant of the motion to remand. The Cuevases did not appeal the dismissal of the TILA claim.

II. DISCUSSION
On appeal, the parties do not dispute that the district court had federal question jurisdiction to consider the TILA claim and supplemental jurisdiction over the state law claims at the time of the remand. The issues on appeal concern whether the district court was obligated to retain jurisdiction and hear the case after it dismissed the federal claim because diversity jurisdiction existed over the state law claims. The defendants argue that the district court abused its discretion in remanding the state law claims because (1) Countrywide Home Loans of Texas was improperly joined; (2) the defendants' waiver of any right to a federal forum because of their failure to remove for diversity within thirty days of being served with the initial complaint became irrelevant once the district court properly had removal jurisdiction over all of the claims under federal question and supplemental jurisdiction; and (3) the exercise of diversity jurisdiction over the state law claims was mandatory once the district court had properly assumed removal jurisdiction. The Cuevases argue that there was no improper joinder and that the defendants waived any right to argue improper joinder or the existence of diversity jurisdiction when it failed to remove the action to federal court within thirty days of service of the initial original complaint that listed Countrywide Home Loans of Texas. We agree with the defendants, and reverse and remand the action to the district court.

A. Standard of Review
Though we typically cannot review an appeal of an order remanding a case to state court, we have jurisdiction to do so when the decision to remand is based "on an affirmative exercise of discretion rather than on a finding of lack of jurisdiction." Adair v. Lease Partners, Inc., 587 F.3d 238, 240 (5th Cir.2009). "Whether a district court has the discretion to remand a case to state court is a legal question this court reviews de novo." Id. If the district court did have discretion to remand the case, we review the decision to remand for an abuse of discretion. Id. "All issues of subject matter jurisdiction, including whether a party is improperly joined, are questions of law reviewed de novo." Gasch v. Hartford Accident & Indem. Co., 491 F.3d 278, 281 (5th Cir.2007).


*248 B. Discretion to Remand and the Effect of Waiver of Right to Remove

The issue of whether a party's previous failure to argue fraudulent joinder and timely remove the case on the basis of diversity jurisdiction affects the district court's authority to remand state law claims after the case has been properly removed to district court is res nova in this Court and our sister courts of appeals. In Buchner v. Federal Deposit Insurance Corporation, a case examining whether remand was proper after a party had waived its right to removal on the basis of federal question jurisdiction, we stated that "the ability of a party to remove a case and the ability of a court to remand a case that has been properly removed by a party are distinct concepts not necessarily subject to the same rules." 981 F.2d 816, 818 (5th Cir.1993). "Unquestionably, a party may implicitly waive its right to remove a case by failing timely to file a notice of removal." Id. "Likewise, a party may implicitly waive its right to contest the removal of a case on procedural grounds by failing timely to move for remand." Id.
Once the district court has assumed jurisdiction over a properly removed case, however, whether a party had previously waived its right to a federal forum at some earlier point in the litigation by failing to timely remove is irrelevant to the determination of whether the district court can or should remand the action. See id. The district court's authority to remand the case to state court depends on the nature of the district court's jurisdiction over the claims that comprise the case at the time of the remand. Id.; Adair, 587 F.3d at 240.
"When the federal court has original subject-matter jurisdiction over a claim, that jurisdiction is `not discretionary with the district court' and `can neither be conferred nor destroyed by the parties' waiver or agreement.'" Adair, 587 F.3d at 241 (quoting Buchner, 981 F.2d at 820-21). If the district court only has supplemental jurisdiction over the claim, Congress has granted authority to the district court to adjudicate the claim or remand the claim based on the court's discretion. Id. (citing 28 U.S.C §§ 1367(c), 1441(c)). Thus, we must examine whether the district court had diversity jurisdiction over the state law claims at the time of the remand.

C. Diversity Jurisdiction and Improper Joinder
The district courts have original jurisdiction of civil actions where the matter in controversy exceeds the sum or value of $75,000, exclusive of costs and interest, and is between citizens of different states. 28 U.S.C. § 1332. It is undisputed that the matter in controversy exceeds $75,000; thus whether diversity jurisdiction exists over the state law claims hinges on whether Countrywide Home Loans of Texas's presence in the action destroyed diversity. In their notice of removal and their response to the Cuevases' motion to remand, the defendants argued that there was no reasonable basis for the Cuevases to recover from Countrywide Home Loans of Texas because (1) the entity never serviced the Cuevases' Home Loans, and (2) Countrywide Home Loans of Texas was an inactive corporation at all times relevant to the litigation.[2] The district court held that the defendants failed to carry their burden of proving improper joinder because "the complaint makes no distinction between the origination and later servicing of their home loan" and because the Secretary of *249 State's records showed that Countrywide Home Loans of Texas was in existence and in use when the Cuevases filed suit. We disagree with the district court. The defendants have carried the burden of proving improper joinder; the district court has diversity jurisdiction over the state law claims.

1. Law
The improper joinder doctrine constitutes a narrow exception to the rule of complete diversity. McDonal v. Abbott Labs., 408 F.3d 177, 183 (5th Cir.2005). "[T]he purpose underlying the improper joinder inquiry is to determine whether or not the in-state defendant was properly joined." Id. Thus, "the focus of the inquiry must be on the joinder, not on the merits of the plaintiff's case." Id. The burden is on the removing party; and the burden of demonstrating improper joinder is a heavy one. See id. (citing Griggs v. State Farm Lloyds, 181 F.3d 694, 699 (5th Cir.1999)). To establish improper joinder, the removing party must demonstrate either: "(1) actual fraud in the pleading of jurisdictional facts, or (2) inability of the plaintiff to establish a cause of action against the non-diverse party in state court." Smallwood v. Ill. Cent. R.R. Co., 385 F.3d 568, 573 (5th Cir.2004) (en banc) (citing Travis v. Irby, 326 F.3d 644, 646-47 (5th Cir.2003)). Only the second way is before us.
Under the second way, the test is "whether the defendant has demonstrated that there is no possibility of recovery by the plaintiff against an in-state defendant, which stated differently means that there is no reasonable basis for the district court to predict that the plaintiff might be able to recover against an in-state defendant." Id. If there is no reasonable basis of recovery, then the court can conclude that the plaintiff's decision to join the in-state defendant was indeed improper, unless that showing compels the dismissal of all defendants. McDonal, 408 F.3d at 183; Smallwood, 385 F.3d at 575. There is no improper joinder if the defendants' showing "compels the same result for the resident and nonresident defendants," because this simply means that "the plaintiff's case is ill founded as to all of the defendants." McDonal, 408 F.3d at 183 (citation and internal quotation marks omitted); Smallwood, 385 F.3d at 574 (citation and internal quotation marks omitted). Such a defense is more properly an attack on the merits of the claim, rather than an inquiry into the propriety of the joinder of the in-state defendant. Id.
Finally, any contested issues of facts and any ambiguities of state law must be resolved in the Cuevases' favor. Travis, 326 F.3d at 649.

2. Analysis
In deciding what procedure was necessary to predict whether the Cuevases have a reasonable basis of recovery under the state law, the district court appears to have relied primarily on the complaint, but also pierced the complaint to determine whether (1) Countrywide Home Loans of Texas was in existence and in use during the relevant period of litigation,[3] and (2) there was discrete, undisputed evidence that Countrywide Home Loans of Texas did not service or originate the loans. The district court's process clearly fell within the bounds of the discretion we outlined in Smallwood, 385 F.3d at 573-74 (5th Cir. *250 2004). Accordingly, we review using the same process.
On appeal, the defendants no longer dispute that Countrywide Home Loans of Texas was in existence and in use during all relevant times of the litigation. The defendants continue to argue that Countrywide Home Loans of Texas did not originate or service the Cuevases loans, and therefore that the Cuevases cannot recover against Countrywide Home Loans of Texas. After reviewing the record, we agree that there is no reasonable basis to predict that the Cuevases might be able to recover against the in-state defendant.
The defendants provided undisputed evidence establishing that Countrywide Home Loans of Texas did not originate or service the loans. The deeds of trust list First Magnus Corporation as the lender that originated the loan. To support its contention that Countrywide Home Loans of Texas does not service loans and has never serviced loans, the defendants offered the affidavit of Devra Lindgren, Vice-President and Assistant Corporate Secretary of Bank of America, N.A.[4] Lindgren testified from her personal knowledge of the structure of Bank of America, its subsidiaries, and its affiliatesincluding Countrywide entities such as Countrywide Home Loans of Texasand her review of relevant business records. Lindgren testified that the Cuevases' loan was serviced by Countrywide Home Loans Servicing LPwhich later changed its name to BAC Home Loans Servicing, LPat all times relevant to the complaint. Lindgren further testified that Countrywide Home Loans of Texas was created to conduct the mortgage origination business of Full Spectrum Lending, Inc. Finally, she averred that Countrywide Home Loans of Texas did not originate the Cuevases loan, nor did it ever service loans for the Cuevases or anyone else.
In their reply to the defendants' response in opposition to the motion for remand, the Cuevases failed to produce any evidence disputing the defendants evidence or supporting their own allegations. Further, the evidence in the record lends support to Lindgren's statement that Countrywide Home Loans Servicing LP serviced the Cuevases' home loan. In their amended complaint, the Cuevases alleged that Countrywide sent the Cuevas family a letter on January 21, 2009, informing the Cuevases of their default and the amount they had to pay by February 20, 2009. The very first line of the January 21 letter, which was typed on "Countrywide Home Loans" letterhead, states that Countrywide Home Loans Servicing LP (now known as BAC Home Loans Servicing, LP) services the home loan for the Cuevas property in Porter, Texas.
In light of the defendants' undisputed evidence that Countrywide Home Loans of Texas did not originate or service the Cuevases' home loan, we find that the defendants have demonstrated that the Cuevases have no possibility of recovery against the in-state defendant. The defendants have carried their burden of proving the improper joinder of Countrywide Home Loans of Texas. The remaining parties are diverse; the district court had diversity jurisdiction over the state law claims at the time of remand. When the district court has original subject matter jurisdiction over state law claims, the exercise of that jurisdiction is mandatory. The parties cannot waive or agree to destroy that original jurisdiction. See Adair, 587 F.3d at 241. The district court erred in remanding the state law claims.


*251 III. CONCLUSION
For the reasons stated above, we reverse the district court's decision to remand the state law claims to Texas state court and remand for proceedings consistent with this opinion.
REVERSED AND REMANDED.
NOTES
[1]  The district court erred when it stated that it was granting the Cuevases' motion to remand. In the opinion and order, the district court clearly found that removal to the federal district court was proper because there was federal jurisdiction over the TILA claim and supplemental jurisdiction over the state law claims. Thus, when it remanded the state law claims after dismissing the TILA claim, it was not remanding the case on the basis of any defect identified in a motion for remand filed within thirty days of the notice of removal. See 28 U.S.C. § 1447(c). Instead, the district court remanded the case using its discretion under 28 U.S.C. § 1367(c) and declined to exercise supplemental jurisdiction over the state law claims after dismissing the only claim over which it found it had original jurisdiction.
[2]  On appeal, the defendants do not dispute that Countrywide Home Loans of Texas was in existence and in use during all relevant times of the litigation.
[3]  In its order and opinion, the district court referred to the Secretary of State's records to confirm that Countrywide Home Loans of Texas was in existence and in use when the Cuevases filed suit.
[4]  Bank of America, N.A. wholly owns BANA LP, LLC and BANA GP, LLC, which are the limited partners in BAC Home Loans Servicing, LP.
