
690 S.E.2d 293 (2010)
The STATE of North Carolina DEPARTMENT OF HEALTH AND HUMAN SERVICES, DIVISION OF MEDICAL ASSISTANCE, Plaintiff,
v.
Emily ARMSTRONG, By and Through her guardian ad litem, Stephanie GIBBS, Sandra Armstrong and William Armstrong, Individually, Defendants.
No. COA09-639.
Court of Appeals of North Carolina.
March 16, 2010.
*294 Attorney General Roy A. Cooper, III, by Special Deputy Attorney General Belinda A. Smith, for plaintiff-appellee.
Kirby & Holt, L.L.P., by C. Mark Holt and William B. Bystrynski, Raleigh and Sigmon, Clark, Mackie, Hutton, Hanvey & Ferrell, P.A., by Jeffrey T. Mackie, Hickory, for defendant-appellants.
STROUD, Judge.
Emily, Sandra, and William Armstrong (collectively "the Armstrongs") filed a motion to abate this lawsuit filed against them by the State of North Carolina Department of Health and Human Services, Division of Medical Assistance because of a prior pending federal court case arising out of the same subject matter. The trial court denied the Armstrongs' motion, and they appealed. For the following reasons, we reverse.

I. Background
On or about 21 February 2003 the Armstrongs filed a complaint seeking damages for medical malpractice against James Barnes, M.D., Newton Women's Care, P.A., Catawba Memorial Hospital, Inc., and Catawba Valley Medical Center, Inc. (collectively "2003 defendants"). The Armstrongs alleged that Emily was injured during her birth by the 2003 defendants' negligence, causing her serious permanent injuries, including cerebral palsy and severe disabilities requiring daily skilled nursing care and several forms of therapy.
On 14 November 2006, the Armstrongs and the 2003 defendants settled the medical malpractice case. As part of the settlement order ("2006 Settlement Order"), the trial court ordered
[d]efendants James Barnes, M.D. and Newton Women's Care, P.A., and their insurer, are authorized and directed to pay into the Catawba County Clerk of Court's office the sum set out in the Settlement Schedule as the maximum potential amount of the Medicaid lien, as provided by N.C. Gen.Stat. § 108A-57, to be held in an interest-bearing account until such time as the actual amount of the lien owed by Emily Armstrong to the North Carolina Division of Medical Assistance is conclusively judicially determined. The funds can only be ordered to pay the lien or distributed to the Emily M. Armstrong Irrevocable Special Needs Trust.

A. Federal Lawsuit
On or about 22 March 2007, Emily Armstrong filed a lawsuit against Carmen Odom in her official capacity as Secretary of the North Carolina Department of Health and Human Services ("DHHS") in federal court ("federal lawsuit"). Emily Armstrong requested, inter alia:
1. A judgment declaring that Defendant DHHS does not have a lien on the proceeds from the minor Plaintiff's personal injury action now held in the Catawba County Clerk's office.
2. A judgment declaring that G.S. § 108A-57 and § 108A-59 are unconstitutional under the Supremacy Clause of the United States Constitution to the extent that these statutes allow Defendant DHHS to impose a lien on compensation for damages other than medical expenses in violation of 42 U.S.C. § 1396a, 42 U.S.C. § 1396k, and 42 U.S.C. § 1396p.
3. A judgment enjoining Defendant DHHS from imposing a lien on the proceeds from the minor Plaintiff's personal injury action and from enforcing G.S. § 108A-57 and § 108A-59 in a manner that violates federal law;
4. An order that the Clerk of Court of Catawba County pay the entire sum held out of the proceeds of Emily Armstrong's *295 settlement to The Emily M. Armstrong Irrevocable Special Needs Trust.
On or about 6 July 2009, Emily's federal complaint was amended to add Sandra and William Armstrong as parties. The amended complaint also substituted Lanier Cansler for Carmen Odom, in his official capacity as Secretary of DHHS.

B. Current Pending State Lawsuit
On or about 24 September 2007, the State of North Carolina Department of Health and Human Services, Division of Medical Assistance ("DHHS") filed a complaint against James Barnes, M.D., Newton Women's Care, P.A., Catawba Memorial Hospital, Inc., Catawba Valley Medical Center, Inc., Emily, Sandra, and William Armstrong (collectively "2007 defendants") requesting that the trial court order disbursement of the funds being held by the Catawba Clerk of Court pursuant to the 2006 Settlement Order. DHHS alleged:
1. The Honorable Thomas Kincaid sitting for the Superior Court of Catawba County approved a settlement secured on behalf of Emily Armstrong, a minor, and her parents through their lawsuit for medical malpractice and negligence; the order was entered under seal in case number 03 CVS 525. Judge Kincaid, pursuant to his authority granted the Superior Courts of North Carolina under G.S. § 1-508, placed the full amount of the Division of Medical Assistance's lien for medical payments in escrow with the Clerk of Court of Catawba County for future disbursement.
2. Under N.C.G.S. § 108A-57 ... the State's mandated statutory recovery of medical expenses from the settlement received by Emily Armstrong and Mr. and Mrs. Armstrong is one-third the gross amount of the settlement, i.e., the full amount placed in escrow by Judge Kincaid.
3. Emily Armstrong received $1,903,004.37 in medical payments by the State of North Carolina for medical care related to the settlement she and her parents received.
4. Under N.C.G.S. § 108A-57, the State is capped at recovering one-third the gross amount of settlement.
5. The funds held in escrow by the Clerk of Court are the last remaining funds to be disbursed from the settlement.
Eventually all of the 2007 defendants were dismissed with prejudice from DHHS's state lawsuit except for the Armstrongs. The Armstrongs filed an answer, asserting as defenses failure to state a claim pursuant to North Carolina Rule of Civil Procedure 12(b)(6) and a "prior pending action" as "Emily Armstrong ... filed a Complaint in the United States District Court for the Western District of North Carolina, seeking a declaratory judgment that the State of North Carolina improperly and unconstitutionally attempted to impose a lien on funds[.]"
On or about 18 September 2008, DHHS filed a motion for summary judgment. On 2 January 2009, the Armstrongs filed a motion to dismiss or abate DHHS's action due to the prior pending action in federal court. The Armstrongs alleged:
1. This claim arises out of an assertion by the State of North Carolina that it has a lien for one-third of the proceeds of a tort recovery received by Emily Armstrong, a 8-year-old girl suffering from cerebral palsy who lives with her parents in Alexander County.
2. Emily Armstrong, through her guardian ad litem, filed an underlying tort complaint in state court, stating that she suffered cerebral palsy as a result of injuries she suffered at her birth caused by the negligence of the doctor who delivered her and the hospital personnel. As a result of those injuries, Emily cannot sit, crawl, walk or talk. Emily receives skilled nursing care that is paid for by the Medicaid program.
3. As part of Emily's settlement of the tort claim, Defendant DHHS was notified of the hearing for approval of the minor's settlement. On November 13, 2006, a hearing was held and the settlement was approved. The DHHS attorneys did not attend the hearing.
4. At that hearing, Judge Timothy S. Kincaid determined the maximum amount that DHHS could seek to recover as its *296 lien and ordered that amount paid into the Catawba County Clerk of Court's office.
5. Judge Kincaid further ordered the dismissal of the underlying tort claim, once the defendants in that claim had fulfilled their obligations, and that underlying claim was dismissed with prejudice December 12, 2006.
5. (sic) On March 22, 2007, Emily Armstrong filed a claim in U.S. District Court, Western District of North Carolina, under 42 U.S.C. § 1983, seeking declaratory and injunctive relief and claiming that the State of North Carolina is violating 42 U.S.C. § 1396p, the federal Medicaid anti-lien statute, and is in violation of the Supremacy Clause and the Equal Protection Clause of the Constitution of the United States by insisting it is entitled to one-third of Emily Armstrong's settlement. In their lawsuit, plaintiffs sought to have the federal court determine the proper amount of the funds held in the Catawba County Clerk of Court's office that should be allocated to Medicaid's lien.
6. On September 24, 2007, more than six months after Emily Armstrong filed suit in U.S. District Court, the State of North Carolina filed the instant suit against Emily Armstrong, asking this court to award it all of the money held in the Catawba County Clerk's office.
7. The case filed in March, 2007, in the U.S. District Court in the Western District of North Carolina involves a substantial identity of parties, interests, and relief demanded with the instant case.
On 28 January 2008, the trial court denied the Armstrongs' motion to dismiss or abate and scheduled a hearing for DHHS's motion for summary judgment. The Armstrongs appealed.

II. Abatement
Our courts have previously determined that an order denying a motion for abatement due to a prior pending action is immediately appealable. See Atkins v. Nash, 61 N.C.App. 488, 489, 300 S.E.2d 880, 881 (1983). The Armstrongs argue that the trial court erred in denying their motion to abate this state lawsuit based upon a prior pending action, the federal lawsuit. "When a prior action is pending between the same parties, affecting the same subject matter in a court within the state or the federal court having like jurisdiction, the subsequent action is wholly unnecessary and therefore, in the interest of judicial economy, should be subject to a plea in abatement." State ex rel. Onslow County v. Mercer, 128 N.C.App. 371, 375, 496 S.E.2d 585, 587 (1998) (citations omitted). "Under North Carolina law, to prevail in a plea in abatement, a defendant must show that the parties, subject matter, issues and relief sought are the same in both the present and prior actions." Mercer at 372, 496 S.E.2d at 586 (citation omitted). "In determining whether the parties and causes are the same for the purpose of abatement by reason of the pendency of the prior actions, the ordinary test is this: Do the two actions present a substantial identity as to parties, subject matter, issues involved and relief demanded." Mercer at 375, 496 S.E.2d at 588 (citations and quotation marks omitted). We will therefore address each of these factors.
The parties to the federal lawsuit are the Armstrongs and Lanier Cansler in his official capacity as secretary of DHHS. In this state lawsuit, after the other defendants who no longer have any interest in the case were dismissed, the parties are now the Armstrongs and DHHS. Thus, the parties in both the federal lawsuit and this action are the same.
The Armstrongs argue as to the subject matter of the two actions that "[t]he federal court claim seeks money [in the Catawba County Clerk's office] on behalf of Emily Armstrong, and the state court claim seeks that money on behalf of DHHS." We agree with the Armstrongs' argument that the subject matter of both lawsuits is the funds held by the Catawba County Clerk's office based upon the 2006 Settlement Order and DHHS's lien asserted pursuant to N.C. Gen.Stat. § 108A-57.
The issues which must be determined in the federal lawsuit and in this state action are also substantially the same. The Armstrongs' federal lawsuit challenges the validity of the lien, while DHHS's state lawsuit *297 seeks to recover the funds it alleges are subject to the lien. In each case, the trial court must ultimately determine the issues raised by the Armstrongs challenged to DHHS's lien pursuant to N.C. Gen.Stat. § 108A-57. Depending upon the resolution of those issues, the trial court will order that the funds being held by the Clerk of Court of Catawba County be distributed either to the Emily M. Armstrong Irrevocable Special Needs Trust or to DHHS. Therefore, the issues are also substantially similar.
Finally, all parties are seeking essentially the same remedy, as both DHHS and the Armstrongs seek to have the lien funds released. DHHS's brief points out numerous "differences" between the federal lawsuit and the state lawsuit. We are unpersuaded. In Clark v. Craven Reg'l Med. Auth., 326 N.C. 15, 387 S.E.2d 168 (1990), the parties, subject matter, issues, and remedies requested were not identical. The main legal contentions, however, were the same, and the North Carolina Supreme Court therefore ultimately determined that
while these remedies are procedurally distinct, as applied in these cases the intended result would be the same. In both cases, plaintiffs have sought an equitable remedy which would have the effect of compelling defendant to obtain a building permit and pay fees to plaintiff City of New Bern rather than to the County of Craven. Under these circumstances, we find that the remedies requested by plaintiffs, while technically distinct from one another, are substantially similar in the result sought. Furthermore, we note that where an action is pending between the parties, a plaintiff cannot bring another action involving the same subject matter and the same defendant even where the first suit demanded remedies clearly distinct from the second. In examining this question as long ago as 1936 in a case where the plaintiff sought damages in the first suit and injunctive relief in a second suit against the same defendant on the same grounds, this Court concluded this is not only taking two bites at the cherry, but biting in two places at the same time. In summary, we find the parties, subject matter, issues involved and relief requested are sufficiently similar to warrant issuance of the order of abatement in this case.
Clark at 22-23, 387 S.E.2d at 172-73 (citation and quotation marks omitted). "In summary, we [too] find the parties, subject matter, issues involved and relief requested are sufficiently similar to warrant issuance of the order of abatement in this case." Id. at 23, 387 S.E.2d at 173.

III. Conclusion
As the federal lawsuit and this state lawsuit involve substantial identity as to the parties, subject matter, issues, and remedies sought, the trial court erred in denying the Armstrong's motion to abate and for this reason we reverse.
REVERSED.
Judges STEPHENS and BEASLEY concur.
