
277 P.3d 1252 (2012)
2012-NMCA-048
ZUNI PUBLIC SCHOOL DISTRICT, # 89, Petitioner-Appellee,
v.
STATE of New Mexico PUBLIC EDUCATION DEPARTMENT and Veronica Garcia, Secretary of Education, Respondents-Appellants.
No. 30,861.
Court of Appeals of New Mexico.
February 6, 2012.
Certiorari Denied, April 12, 2012, No. 33,490.
*1253 VanAmberg, Rogers, Yepa, Abeita & Gomez, LLP, C. Bryant Rogers, Ronald J. Vanamberg, Santa Fe, NM, for Appellee.
Gary K. King, Attorney General, Andrea R. Buzzard, Assistant Attorney General, Santa Fe, NM, Willie R. Brown, General Counsel, Public Education Department, Santa Fe, NM, for Appellants.

OPINION
CASTILLO, Chief Judge.
{1} The sole question before us is whether sovereign immunity bars Zuni Public School District #89 (Zuni) from bringing suit against the New Mexico Public Education Department and its secretary (State) for reimbursement of funds that Zuni claims were wrongfully deducted from its portion of state funding for public schools. Deciding that such cause of action does not violate the doctrine of sovereign immunity, we affirm the district court's denial of the State's motion to dismiss on that ground.

BACKGROUND
{2} Zuni, a New Mexico Public School District as defined in NMSA 1978, Section 22-1-2(R) (2010), filed a petition for writ of mandamus, declaratory relief, and injunctive relief in district court. The petition seeks to compel the State to reimburse Zuni for funds withheld by the State before the federal-equalization certification was issued by the federal government on April 26, 2010. The State filed a motion to dismiss Zuni's complaint based on a claim of sovereign immunity and other grounds. The district court denied the motion but allowed for interlocutory appeal. This Court considered the State's application for interlocutory appeal as one for writ of error and granted the application only on the issue of sovereign immunity. Before we begin our discussion of the question regarding sovereign immunity, we provide a brief explanation of the New Mexico public school funding formula.
{3} The Public School Finance Act, NMSA 1978, §§ 22-8-1 to -48 (1967, as amended through 2011), "governs the operational funding of New Mexico's public schools." Taos Mun. Schs. Charter Sch. v. Davis, 2004-NMCA-129, ¶ 10, 136 N.M. 543, 102 P.3d 102, abrogated on other grounds by Smith v. City of Santa Fe, 2007-NMSC-055, 142 N.M. 786, 171 P.3d 300. An overview and history of funding for public schools is found in Lynn Carrillo Cruz, No Cake for Zuni: The Constitutionality of New Mexico's Public School Capital Finance System, 37 N.M. L.Rev. 307, 314-24 (2007). "A key feature of New Mexico's public school operational funding scheme is the state equalization guarantee distribution, which is a formula through which the [s]tate apportions federal and local revenue for schools equitably among the state's school districts." Taos Mun. Sch. Charter Sch., 2004-NMCA-129, ¶ 12, 136 N.M. 543, 102 P.3d 102; see § 22-8-25(A).
*1254 {4} The implementation of the formula is guided by both state and federal statutes. Federal statute 20 U.S.C. § 7709 (2002) governs the provision of Federal Impact Aid to local school districts affected by federal activities that decrease the school districts' tax base. Land, such as military bases and Indian reservations, are exempt from local property taxesthe taxes that serve as the main source of school funding. To address this potential shortfall in funding, Federal Impact Aid provides revenue to supplement the budgets of schools so affected. Id. However, that revenue may be offset by states when distributing state monies in order to equalize funding throughout the state and provide fairness to all local districts. 20 U.S.C. § 7709; § 22-8-25. States may offset federal revenue going to local districts as long as the state is granted certification to do so by the federal Department of Education (DOE). Id. This funding system, and New Mexico's implementation of it, was endorsed by the United States Supreme Court in Zuni Public School District No. 89 v. Department of Education, 550 U.S. 81, 100, 127 S.Ct. 1534, 167 L.Ed.2d 449 (2007). In effect, the State guarantees each school district the funds needed to meet its operating budget; the State reduces state revenues based on state and federal law for districts that get federal funds such as the Federal Impact Aid received by Zuni.
{5} The Zuni school district receives Federal Impact Aid each year. However, 75 percent of that money is offset by a matching reduction in state revenues to Zuni, provided that the DOE Secretary grants certification to the State before the end of the fiscal year, which is June 30. In this dispute, Zuni objects to the fact that the State implemented a pro-rated 75 percent reduction in state revenues in each monthly installment starting at the beginning of the fiscal year, in July 2009, despite the fact that the State did not receive federal certification until April 26, 2010. Zuni does not challenge the State's ability to implement the 75 percent offset after receiving certification; Zuni instead argues that the State was prohibited from implementing the offset for those first ten months of the fiscal year before the April certification.
{6} The State's position is that certification may be granted at any time before the end of the fiscal year on June 30; that monthly allocations are merely estimates throughout the fiscal year; and that funding figures are not final until after certification is granted and the school districts modify their budgets. Thus, according to the State, everything evens out by the end of the fiscal year, and no district receives less money than it needs to operate. In fiscal year 2009-10, the year in question, Zuni had an operating budget of $10.5 million and was calculated to receive $6.2 million in Federal Impact Aid. The State, though, offset that latter amount by 75 percent, or $4.6 million in withheld state funding. Zuni challenges the offset and argues that it should be able to pursue its suit in New Mexico district court.
{7} On appeal, the State essentially makes two arguments. First, it contends that Zuni's claim is based on a federal statute and that, therefore, the State retains constitutional sovereign immunity from suit in its own state courts. Second, the State argues that Zuni's action for money damages is barred by the State's common law sovereign immunity. We address each argument below.

DISCUSSION

A. Standard of Review
{8} "We issue writs of error to review immunity from suit cases because we consider them collateral order[s] affecting interests that would be irretrievably lost if the case proceeded to trial." Campos de Suenos, Ltd. v. Cnty. of Bernalillo, 2001-NMCA-043, ¶ 15, 130 N.M. 563, 28 P.3d 1104 (alteration in original) (internal quotation marks and citation omitted). "We review de novo the validity of a claim of sovereign immunity." State ex rel. San Miguel BCC v. Williams, 2007-NMCA-036, ¶ 20, 141 N.M. 356, 155 P.3d 761. "Mandamus is appropriate to compel the performance of an affirmative act by another where the duty to perform the act is clearly enjoined by law and where there is no other plain, speedy[,] and adequate remedy in the ordinary course of law." West v. San Jon Bd. of Educ., 2003-NMCA-130, ¶ 9, 134 N.M. 498, 79 P.3d 842 (internal quotation marks and citation omitted). A motion to *1255 dismiss pursuant to Rule 1-012(B)(6) NMRA tests the legal sufficiency of the complaint. Howse v. Roswell Indep. Sch. Dist., 2008-NMCA-095, ¶ 14, 144 N.M. 502, 188 P.3d 1253. The review of an order granting or denying a motion to dismiss is a question of law that we review de novo. Garcia v. Dorsey, 2006-NMSC-052, ¶ 13, 140 N.M. 746, 149 P.3d 62.

B. State vs. Federal Claim
{9} Zuni asserts that its petition is based on the state funding statute. The State, on the other hand, contends that Zuni's petition is grounded in the Federal Impact Aid statute. The distinction is key to resolving whether the State is shielded from this action by sovereign immunity.
{10} The Eleventh Amendment of the United States Constitution immunizes states and their officers acting in an official capacity from claims for money damages or in equity arising under a federal question, unless the state consents to suit. U.S. Const. amend. XI. States enjoy sovereign immunity not only in suits arising from the Constitution of the United States but also from suits grounded in acts of Congress and brought in federal court. Seminole Tribe of Fla. v. Florida, 517 U.S. 44, 116 S.Ct. 1114, 134 L.Ed.2d 252 (1996). Congress also is barred from subjecting states to federal claims that are brought in state courts. Alden v. Maine, 527 U.S. 706, 716, 119 S.Ct. 2240, 144 L.Ed.2d 636 (1999) ("The leading advocates of the Constitution assured the people in no uncertain terms that the Constitution would not strip the [s]tates of sovereign immunity."). Our own Supreme Court has stated: "Alden and its progeny stand for the proposition that state constitutional sovereign immunity bars individual claims for damages that are based on legislation passed by Congress pursuant to its Article I powers." Manning v. N.M. Energy, Minerals & Natural Res. Dep't, 2006-NMSC-027, ¶ 24, 140 N.M. 528, 144 P.3d 87; see Gill v. Pub. Emps. Ret. Bd., 2004-NMSC-016, ¶ 15, 135 N.M. 472, 90 P.3d 491; Cockrell v. Bd. of Regents of N.M. State Univ., 2002-NMSC-009, ¶ 7, 132 N.M. 156, 45 P.3d 876. Thus, if this action is based on 20 U.S.C. § 7709, as the State claims, it would be barred under the doctrine of constitutional sovereign immunity.
{11} As United States Supreme Court Justice Cardozo said: "Not every question of federal law emerging in a suit is proof that a federal law is the basis of the suit." Gully v. First Nat'l Bank, 299 U.S. 109, 115, 57 S.Ct. 96, 81 L.Ed. 70 (1936). An action brought under state statutes will not implicate original federal jurisdiction "unless it appears that some substantial, disputed question of federal law is a necessary element of one of the well-pleaded state claims, or that one or the other claim is `really' one of federal law." Franchise Tax Bd. of State of Cal. v. Constr. Laborers Vacation Trust for So. Cal., 463 U.S. 1, 13, 103 S.Ct. 2841, 77 L.Ed.2d 420 (1983). A complaint otherwise based on state law might still "arise under" federal law "if a well-pleaded complaint established that its right to relief under state law requires resolution of a substantial question of federal law in dispute between the parties." Id. An action is not converted into a federal claim merely by the exercise of a federal law defense. See Vaden v. Discover Bank, 556 U.S. 49, 60, 129 S.Ct. 1262, 1272, 173 L.Ed.2d 206 (2009); Skelly Oil Co. v. Phillips Petroleum Co., 339 U.S. 667, 672-73, 70 S.Ct. 876, 94 L.Ed. 1194 (1950).
{12} Even if a plaintiff, in its complaint, anticipates a federal defense, that is not enough to hand jurisdiction to the federal courts under the assertion that the suit arises under the laws of the United States. See Louisville & Nashville R.R. Co. v. Mottley, 211 U.S. 149, 152, 29 S.Ct. 42, 53 L.Ed. 126 (1908). For example, when consumers brought suit against a pharmaceutical company alleging that its drug caused birth defects, basing the complaint in part on an alleged violation of the federal Food, Drug, and Cosmetic Act, the United States Supreme Court concluded that no federal question was present. Merrell Dow Pharm. Inc. v. Thompson, 478 U.S. 804, 804-05, 106 S.Ct. 3229, 92 L.Ed.2d 650 (1986). The Court endorsed the rule of the "well-pleaded complaint" and determined that the action in question arose under state law. Id. at 808, 106 S.Ct. 3229. The Court in Merrell Dow relied on this earlier determination:

*1256 The general rule is that, where it appears from the bill or statement of the plaintiff that the right to relief depends upon the construction or application of the Constitution or laws of the United States, and that such federal claim is not merely colorable, and rests upon a reasonable foundation, the [federal] [d]istrict [c]ourt has jurisdiction under this provision.
Smith v. Kansas City Title & Trust Co., 255 U.S. 180, 199, 41 S.Ct. 243, 65 L.Ed. 577 (1921). The Court in Merrell Dow thus concluded: "This case does not pose a federal question of the first kind; [plaintiffs] do not allege that federal law creates any of the causes of action that they have asserted." 478 U.S. at 809, 106 S.Ct. 3229.
{13} It is helpful to draw parallels to the facts in the present case and those in Franchise Tax Board. In Franchise Tax Board, the California Tax Board filed suit against a welfare benefit trust in an effort to collect unpaid personal income taxes. The action raised the question of whether the federal Employee Retirement Income Security Act (ERISA) preempted the state's authority to impose taxes on those funds held in trust. Franchise Tax Bd., 463 U.S. at 3-4, 103 S.Ct. 2841. The United States Supreme Court held that the suit was grounded in state law and was not removable to a federal venue. California law, the Court reasoned, "establishe[d] a set of conditions, without reference to federal law, under which a tax levy may be enforced; federal law becomes relevant only by way of a defense to an obligation created entirely by state law[.]" Id. at 13, 103 S.Ct. 2841. The court declared that
a federal court does not have original jurisdiction over a case in which the complaint presents a state-law cause of action, but also asserts that federal law deprives the defendant of a defense he may raise, or that a federal defense the defendant may raise is not sufficient to defeat the claim[.]
Id. at 10, 103 S.Ct. 2841 (citations omitted). Thus, in Franchise Tax Board, the state's right to enforce its tax levies was not "of central concern" to the ERISA statute, id. at 2, 25-26, 103 S.Ct. 2841, and ERISA did not provide a cause of action that would have allowed the state to enforce that right. See id. at 14, 103 S.Ct. 2841. Against this backdrop, we now analyze whether Zuni's claim is primarily based upon a state statute or a federal statute.
{14} In the case before us, we disagree with the State that Zuni's right to relief depends on the Federal Impact Aid statute. And we disagree that resolution of this case involves a substantial question of federal law. Zuni is asking the district court to compel the State to issue Zuni its "full share" of state equalization guarantee (SEG) funds without reducing the amount to offset federal aid. Zuni acknowledges the Federal Impact Aid statute, which allows states to reduce state aid to school districts receiving federal aid and provides parameters by which states may do so. The language, however, mainly speaks to the certification process by which DOE gives its imprimatur for states to attempt to equalize funding among its own school districts, essentially making sure that states do not dilute the intent of the federal law. And while the Federal Impact Aid statute provides administrative remedies for local school districts to challenge a state if the state shortchanges a school district or does so before getting federal certification, 20 U.S.C. § 7709(a) and (d)(2), the federal statute provides no cause of action for a school district wishing to challenge the state's funding formula itself. Zuni has no dispute with DOE; in fact the school district received its Federal Impact Aid funding. Zuni, instead, takes issue with the State for withholding state funds that were to be distributed according to state statute.
{15} As Zuni pointed out in its original petition for writ of mandamus, declaratory relief, and injunctive relief, it is through the SEG formula that New Mexico aims to equalize funding between school districts that receive federal funding and those that do not. While Congress established the Federal Impact Aid program and set guidelines for states to receive federal equalization certification, New Mexico law sets out the method for SEG distributions and establishes the formula for calculating the amount to be distributed to school districts. Section 22-8-25. The state statute begins succinctly: "The state equalization guarantee distribution *1257 is that amount of money distributed to each school district to ensure that its operating revenue, including its local and federal revenues as defined in this section, is at least equal to the school district's program cost." Section 22-8-25(A). The statute allows for a 75 percent reduction in state distributions to offset federal funds categorized as "impact aid." Section 22-8-25(C)(2). The statute also sets out a precise formula for calculating the SEG distribution: "To determine the amount of the state equalization guarantee distribution, the department shall . . .," followed by eight scenarios, two of which involve taking into account federal funds received by a school district. Section 22-8-25(D)(5) and (6) (emphasis added).
{16} Zuni's complaint challenges the actions of the state under Section 22-8-25. It focuses on Section 22-8-25(A)'s general outline of SEG distribution and Section 22-8-25(D)'s eight-part formula that the state is required to follow. Zuni grounds its main argumentthat offsets for Federal Impact Aid are not allowed unless authorized by 20 U.S.C. § 7701 (2003)in Section 22-8-25(C) of the state statute. That subsection allows for the 75 percent offset in state funding, in particular for Federal Impact Aid. Section 22-8-25(C)(2). Zuni challenges the State's actions prior to the April 26, 2010 certification by DOE. Thus, while federal certificationor lack thereofis an element of the complaint, it does not present the controlling question in this action. Rather, it is the State's adherence to the Legislature's directives and the formula set out in Section 22-8-25 that provides the fulcrum for deciding this issue.
{17} Like in Merrell Dow and Franchise Tax Board, we conclude that Zuni's petition is based on state law, with only a tangential connection to federal law. Because this petition pivots on a question of state law, it is not subject to the Eleventh Amendment bar of sovereign immunity.

C. Money Damages Against the State
{18} Zuni seeks to recover money damages in the amount of set off retained by the State for the ten-month period before the State received federal certification. Zuni also seeks interest on that amount plus costs. The State asserts that a suit for monetary damages against the state treasury offends the basic tenets of sovereign immunity. Zuni in turn relies on State ex rel. Hanosh v. New Mexico Envtl. Improvement Bd., 2009-NMSC-047, ¶ 10, 147 N.M. 87, 217 P.3d 100, a recent case from our Supreme Court that reasserted New Mexico's abolition of blanket sovereign immunity, though the case did not address claims for money damages. We discuss the question of whether an entity such as Zuni may bring an action for money damages against the State in a claim based on state law.
{19} New Mexico has abolished the common law tradition of shielding the state from suit through sovereign immunity. Our Supreme Court, in the landmark decision Hicks v. State, 88 N.M. 588, 590, 544 P.2d 1153, 1155 (1975), superseded by statute on other grounds as stated in Gallagher v. Albuquerque Metro. Arroyo Flood Control Auth., 90 N.M. 309, 563 P.2d 103 (Ct.App.1977), abolished the court-created concept that the state was always immune from suit. While Hicks revolved around tort actions, "the case generally abolished the common law doctrine of sovereign immunity in all its ramifications, whether in tort or contract or otherwise, except as implemented by statute or as might otherwise be interposed by judicial decision for sound policy reasons." Torrance Cnty. Mental Health Program, Inc. v. N.M. Health & Env't Dep't, 113 N.M. 593, 597, 830 P.2d 145, 149 (1992). This understanding was re-enforced recently by our Supreme Court in a discussion of Hicks: "Although that case specifically challenged the state's common-law immunity from actions in tort, no one should doubt the broader scope of what this Court has previously described as Hicks's sweeping abolition of sovereign immunity." Hanosh, 2009-NMSC-047, ¶ 10, 147 N.M. 87, 217 P.3d 100 (internal quotation marks and citation omitted). Thus, it is up to the Legislature to specify instances in which sovereign immunity may be invoked by the State.
{20} The State argues that the Tort Claims Act bars this suit. We disagree. In response to Hicks, our Legislature enacted *1258 the Tort Claims Act which reinstated sovereign immunity for certain tort actions committed by governmental entities and employees, while waiving such immunity for other tortious conduct. NMSA 1978, §§ 41-4-1 through -28 (1976, as amended through 2009). Further, the Legislature has specifically not waived sovereign immunity for contract matters that do not involve valid written contracts, NMSA 1978, § 37-1-23 (1976), but has done so for causes of action brought under the Human Rights Act. NMSA 1978, § 28-1-13(D) (2005). Along this line, we observe that the Legislature has not explicitly asserted or waived sovereign immunity for causes of action brought under the Public Schools Finance Act. Further, no New Mexico case has explicitly provided that the State waives sovereign immunity in a suit for money damages against the Public Education Department. Given our Supreme Court's ruling in Hanosh, coupled with the Legislature's failure to assert sovereign immunity with respect to money damages, we conclude that an action involving a public accounting of funds owed by the State to another entity is permitted in New Mexico.

CONCLUSION
{21} We conclude that this action is grounded in state law and there is no statute or case law barring a suit for money damages under the facts contained in the pleadings. Therefore the State is not protected by sovereign immunity. Accordingly, we affirm the district court's denial of the State's motion to dismiss the action on those grounds. We remand the case to the district court for proceedings in accordance with this opinion.
{22} IT IS SO ORDERED.
WE CONCUR: LINDA M. VANZI and TIMOTHY L. GARCIA, Judges.
