The petitioners, a group of pharmacies and a pharmacy trade association (pharmacy providers), seek a writ of certiorari. They ask us to declare unlawful a program under which the New Hampshire Department of Health and Human Services (DHHS), acting as New Hampshire’s Medicaid agency (and referred to variously as “NH Medicaid” or “NH Title XIX”), underpaid pharmacy providers for medical supplies and durable medical equipment (DME) they dispensed to Medicaid recipients as a way of recovering for prior claims DHHS had paid in full but for which Medicare was at least partially liable. We grant the petition.
The following facts appear in the certified record: From October 1,2001, through December 2002, the pharmacy providers dispensed medical supplies and DME to Medicaid recipients and submitted claims to DHHS. Those claims were submitted through a point-of-sale (POS) claimprocessing system maintained by First Health Services Corporation (First Health), under contract to DHHS. All the claims at issue were approved by First Health. The dispute involves claims that were submitted on behalf of Medicaid recipients who were also covered by Medicare, persons sometimes referred to as “dual eligibles.” See Conn. Dept. of Social Services v. Leavitt, 428 F.3d 138, 141 (2d Cir. 2005).
In a September 14, 2001 memorandum to pharmacy providers, First Health explained, among other things, that “[ojther insurance must be billed first for all pharmacy claims ... [and that] [c]laims for coordination of benefits where NH Medicaid is not the primary payer will be processed on-line.” (Emphasis added.) That policy was repeated in an October 1,2001 First Health memorandum to pharmacy providers. An October 23, 2001 First Health document titled “Program Particulars” noted:
Most supplies may be submitted on-line----Note: If the patient has Medicare coverage on the Day of Service, the provider must bill Medicare for (all) supplies. If during a subsequent audit, it is identified that Medicare was not billed, then New Hampshire Me[d]icaid will take action to recoup the reimbursement.
The First Health on-line POS system did not include information that would allow pharmacy providers to determine whether a customer who was a Medicaid recipient was a dual eligible, and such information was not included on the Medicaid cards issued by DHHS. However, at all relevant *653times, DHHS’s Office of Health Planning and Medicaid (OHPM) possessed sufficient information to determine whether the Medicaid recipients to whom the pharmacy providers dispensed medical supplies and DME were also covered by Medicare.
A September 2002 “New Hampshire Medicaid Bulletin” reminded providers of an automated voice response (AVR) system that they could use to: (1) verify Medicaid eligibility by a recipient’s NH Title XIX identification number; (2) verify recipient eligibility for specific dates of service; (3) obtain other insurance information; (4) obtain the correct spelling of a recipient’s first and last names; and (5) obtain a recipient’s date of birth. Regarding the relationship between the on-line POS system and the telephonic AVR system, a May 13, 1994 version of the “New Hampshire Medicaid Billing Manual” provided, in a section titled “Provider Responsibilities”:
You are asked to take reasonable measures to ascertain any third party resources available to the recipient. Verification may be done via the NH Medicaid ID Card through a Point of Sale device, personal computer interface, or by accessing the Automated Voice Response at EDS. NH Medicaid is the payor of last resort, therefore you are asked to bill any other third party resource(s) prior to submitting to NH Medicaid.
(Emphasis added.)
In a January 2003 memorandum, DHHS informed pharmacy providers that they would no longer be allowed to use the First Health POS system to submit claims for medical supplies or DME, and would be required to submit those claims “on either a I1CFA 1500 form, or electronically as a crossover from the carrier.” DHHS implemented the new procedure because, in its words, “some pharmacies have been billing the NII Title XIX Program, via the point-of-sale (POS) system, for medical supplies and DME which are covered under Medicare A and/or B.” After explaining the change in procedure, DHHS noted that “[t]his is a temporary measure until system modifications are completed on the First Health claims processing system to allow for identification of NH Medicaid recipients who have Medicare A and/or B coverage.” Finally, DHHS informed pharmacy providers that “[t]he Surveillance and Utilization Review Unit will be conducting an audit of medical supply and DME services billed by pharmacy providers [and that] Recoupment will be initiated for all claims identified as those for which Medicare was not billed prior to the claim being submitted to NH Title XIX.” (Emphasis omitted.)
DHHS followed up in April 2003 with a letter from OHPM to pharmacy providers that referred to the January memorandum and asserted that *654“RSA 167:60, II, mandates repayment by a provider who has received notice of the overpayment and identification of the claims resulting in the overpayment” and that “[providers who fail to repay identified overpayments may be suspended or terminated.” (RSA 167:60 (2002) is part of a statutory subpart which, in April 2003, was titled “Medicaid Fraud,” and which did not define the term “overpayment.”) The letter then outlined the following procedure by which DHHS intended to recover the purported overpayments it made to pharmacy providers:
Claims for medical supplies and/or DME which were submitted under your provider number and which were not first billed to Medicare are identified on the attached spreadsheet. No action is needed on your part to correct this identified overpayment. OHPM will begin the overpayment correction process in May 2003 by reversing all claims for medical supplies and DME which have been identified as having been billed to NH Title XIX before having been submitted to Medicare. You will see the reversed claims on your Remittance Advice (RA) beginning with checks dated May 9,2003 and ending with checks dated May 23, 2003. Providers with an estimated recovery greater than $6,000.00 will have their claims recovered over the two pay cycles. You should submit the claims identified on the attached spreadsheet to Medicare, which will allow the claims to cross over to EDS for payment of co-pay/deductibles by NH Title XIX. As the Medicare time limit for claim filing is fifteen months after the end of the federal fiscal year, the claim filing deadline is December 31, 2003 for dates of service October 1, 2001 through September 30,2002.
The pharmacy providers did not submit claims to Medicare, as they were instructed, and DHHS carried out the recoupment procedure outlined in the letter.
On October 13, 2004, the pharmacy providers petitioned for a declaratory ruling by the commissioner of DHHS, pursuant to RSA 541-A:l, V (1997) and New Hampshire Administrative Rules, He-C 209. Specifically, they sought declarations that: (1) DHHS’s recoupment procedure violated federal and state law; (2) the monies DHHS recovered were owed to the petitioners; and (3) DHHS would not institute any similar recovery procedures in the future. When more than seven months passed without a ruling from the commissioner, the pharmacy providers requested a writ of certiorari from this court. The question presented for our review was:
*655Whether it is illegal or unlawful for DHHS to withhold money it owes to Petitioners for valid Medicaid claims because DHHS believes that prior Medicaid claims were more appropriately billed to a third party, including Medicare, where federal law expressly requires that DHHS seek any such recoupment directly from the third party, including Medicare.
In response to the request for certiorari, we ordered the commissioner to issue a declaratory ruling. When the commissioner did so, he declined to address the second and third issues raised in the petition. Regarding the first issue, he ruled that DHHS had the authority under federal law to undertake the recovery process outlined in its April 2003 letter. Specifically, he ruled that under 42 U.S.C. § 1396a(a)(25)(B) (2000) and 42 C.F.R. § 433.139(d)(2) (2005), DHHS was required to seek reimbursement for Medicaid claims it paid that were also covered by Medicare, and that DHHS was authorized, by a letter from the Federal Centers for Medicare and Medicaid Services (CMS), to utilize the disputed procedure to collect reimbursements from the pharmacy providers. The petitioners, in turn, asserted that in light of the commissioner’s ruling, the question presented in their request for a writ of certiorari was ripe for adjudication. We agreed and ordered briefing. In its current posture, this case is, effectively, an appeal from the commissioner’s declaratory ruling.
The petitioners argue that the commissioner’s ruling was unlawful because federal law requires that when DHHS determines that it has paid claims that should have been paid by a third party, i.e., Medicare, DHHS is obligated to seek recovery from Medicare, and not from providers by reducing payments to them on subsequent Medicaid claims. They further argue that any guidance to the contrary from federal Medicaid officials, such as the CMS letter, is of no effect because it is inconsistent with federal law, and that when DHHS paid the now disputed claims, it possessed information documenting Medicare eligibility for the Medicaid recipients for whom it approved claims. They conclude by contending that “the Declaratory Ruling issued by DHHS should be vacated and the Providers made whole for all losses.” The State contends that the commissioner’s ruling was not illegal, arbitrary or capricious, and that the petitioners’ request to be made whole is a claim for money damages that is not properly before us, fails to state a claim and is a claim for which the petitioners lack standing.
Certiorari review is an extraordinary remedy, granted not as a matter of right, but rather at the court’s discretion when the substantial ends of justice require it. Petition of Evans, 154 N.H. 142, 145 (2006). Certiorari review is limited to whether the agency acted illegally with *656respect to jurisdiction, authority or observance of the law, whereby it arrived at a conclusion which could not legally or reasonably be made, or unsustainably exercised its discretion or acted arbitrarily, unreasonably, or capriciously. Id. In this case, the extraordinary remedy of certiorari is warranted because the commissioner’s ruling was legally incorrect.
Medicaid is a joint state and federal program under which the federal government provides financial support to states that establish and administer a state Medicaid program, in accordance with federal law, through an approved state plan. Maxi Drug North v. Comm’r, N.H. Dep’t of Health & Human Servs., 154 N.H. 102, 103 (2006). DHHS administers New Hampshire’s state plan. Id. Among other things, a state plan must provide:
(A) that the State.or local agency administering such plan will take all reasonable measures to ascertain the legal liability of third parties (including health insurers, group health plans (as defined in section 607(1) of the Employee Retirement Security Act of 1974 [29 U.S.C. 1167(1)]), service benefit plans, and health maintenance organizations) to pay for care and services available under the plan, including—
(i) the collection of sufficient information (as specified by the Secretary in regulations) to enable the State to pursue claims against such third parties, with such information being collected at the time of any determination or redetermination of eligibility for medical assistance, and
(ii) the submission to the Secretary of a plan (subject to approval by the Secretary) for pursuing claims against such third parties, which plan shall be integrated with, and be monitored as a part of the Secretary’s review of, the State’s mechanized claims processing and information retrieval systems required under section 1396b(r) of this title;
(B) that in any case where such a legal liability is found to exist after medical assistance has been made available on behalf of the individual and where the amount of reimbursement the State can reasonably expect to recover exceeds the costs of such recovery, the State or local agency will seek reimbursement for such assistance to the extent of such legal liability;
(H) that to the extent that payment has been made under the State plan for medical assistance in any case where a third party *657has a legal liability to make payment for such assistance, the State has in effect laws under which, to the extent that payment has been made under the State plan for medical assistance for health care items or services furnished to an individual, the State is considered to have acquired the rights of such individual to payment by any other party for such health care items or services
42 U.S.C. § 1396a(a)(25) (2000).
According to the regulations promulgated in support of 42 U.S.C. § 1396(a),
If the [state] Medicaid agency determines eligibility for Medicaid, it must, during the initial application and each redetermination process, obtain from the applicant or recipient such health insurance information as would be useful in identifying legally liable third party resources so that the agency may process claims under the third party liability payment procedures specified in § 433.139 (b) through (f).
42 C.F.R. § 433.138(b)(1) (2005). In addition, “[i]f a State has a mechanized claims processing and information retrieval system approved by CMS under subpart C of this part, the agency must have an action plan for pursuing third party liability claims and the action plan must be integrated with the mechanized claims processing and retrieval system.” 42 C.F.R. § 433.138(k) (2005).
The Medicaid regulations outline two methods for dealing with thirdparty liability: “cost avoidance” and “pay and recover later.” 42 C.F.R. § 433.139(a)(2) (2005). When the probable liability of a third party is established at the time a claim is filed, the state Medicaid agency is required to practice cost avoidance by rejecting the claim and returning it to the provider for a determination of the amount of third-party liability. See 42 C.F.R. § 433.139(b) (2005). When, on the other hand, probable thirdparty liability is established or other benefits become available after the claim is filed, the state Medicaid agency is required to use the pay and recover later method, see 42 C.F.R. § 433.139(c) (2005), also known as “pay and chase,” Atlanticare Med. Center v. Com’r of Div., 785 N.E.2d 346, 353 (Mass. 2003) (holding that natural reading of 42 U.S.C. § 1396a(25)(B) and legislative history demonstrate congressional intent that state Medicaid agencies seek reimbursement from liable third parties rather than providers). When a state Medicaid agency is obligated to pay and chase, its *658recovery of reimbursement from third parties is governed by 42 C.F.R. § 433.139(d) (2005), which provides, in pertinent part:
(1) If the agency has an approved waiver under paragraph (e) of this section to pay a claim in which the probable existence of third party liability has been established and then seek reimbursement, the agency must seek recovery of reimbursement from the third party to the limit of legal liability within 60 days after the end of the month in which payment is made unless the agency has a waiver of the 60-day requirement under paragraph (e) of this section.
(2) Except as provided in paragraph (e) of this section, if the agency learns of the existence of a liable third party after a claim is paid, or benefits become available from a third party after a claim is paid, the agency must seek recovery of reimbursement within 60 days after the end of the month it learns of the existence of the liable third party or benefits become available.
(Emphases added.) The state Medicaid agency’s obligation to seek recovery from liable third parties is further underscored by 42 C.F.R. § 433.139(f)(1) (2005), which provides: “An agency must seek reimbursement from a liable third party on all claims for which it determines that the amount it reasonably expects to recover will be greater than the cost of recovery. Recovery efforts may be suspended or terminated only if they are not cost effective.” (Emphasis added.) Section 433.139 makes it clear that “recovery of reimbursement” may be had only from liable third parties.
Federal Medicaid payments to states are governed by 42 U.S.C. § 1396b (2000), which provides among other things:
(2)(A) The Secretary [of Health and Human Services] shall... pay to the State, in such installments as he may determine, the amount so estimated [under the previous paragraph], reduced or increased to the extent of any overpayment or underpayment which the Secretary determines was made under this section to such State for any prior quarter and with respect to which adjustment has not already been made under this subsection.
(B) Expenditures for which payments were made to the State under subsection (a) of this section shall be treated as an overpayment to the extent that the State or local agency administering such plan has been reimbursed for such *659 expenditures by a third party pursuant to the provisions of its plan in compliance with section 1396a(a)(25) of this title.
(C) For purposes of this subsection, when an overpayment is discovered, which was made by a State to a person or other entity, the State shall have a period of 60 days in which to recover or attempt to recover such overpayment before adjustment is made in the Federal payment to such State on account of such overpayment. Except as otherwise provided in subparagraph (D), the adjustment in the Federal payment shall be made at the end of the 60 days, whether or not recovery was made.
42 U.S.C. § 1396b(d) (emphasis added).
The regulations promulgated in support of 42 U.S.C. § 1396b allow for “recoupment,” defined as “any formal action by the State or its fiscal agent to initiate recovery of an overpayment without advance official notice by reducing future payments to a provider,” 42 C.F.R. § 433.304 (2005), and, following 42 U.S.C. §§ 1396b(d)(B) and (C), they define “overpayment” as “the amount paid by a Medicaid agency to a provider which is in excess of the amount that is allowable for services furnished under section 1902 of the Act and which is required to be refunded under section 1903 of the Act,” id. However, the regulations further provide that “[t]he requirements of this subpart [which pertains to refunds of overpayments to Medicaid providers] do not apply to ... [c]ases involving third party liability because, in these situations, recovery is sought for a Medicaid payment that would have been made had another party not been legally responsible for payment.” 42 C.F.R. § 433.310(b)(1) (2005). Thus, the regulations establish that payment of a Medicaid claim for which third-party coverage was also available is not an “overpayment” as that term is used in the Medicaid statute and the recoupment regulations.
Based upon a plain reading of the relevant federal statutes and regulations, we conclude that the commissioner committed an error of law by determining that DHHS made overpayments to the pharmacy providers and was entitled to recover those purported overpayments by means of the regulatory recoupment process. As we have already noted, the regulations themselves provide that Subpart F, titled “Refunding of Federal Share of Medicaid Overpayments to Providers,” does not apply to cases such as this, involving the liability of third parties. 42 C.F.R. § 433.310(b)(1).
The State’s arguments against giving this language its plain meaning are not persuasive. First, preventing DHHS from using the overpayment recoupment process under the circumstances of this case would not make *660DHHS the payor of first resort; it would merely require DHHS to carry out its statutory duties to: (1) collect information on possible third-party liability when it determines Medicaid eligibility; (2) deny claims when third-party liability is established at the time those claims are made; and (3) seek timely reimbursement from liable third parties when the existence or availability of other benefits is established after a claim is filed. Second, the State’s argument that adherence to the plain meaning of 42 C.F.R. § 433.310(b)(1) would defeat its rights as a subrogee of one or more Medicare beneficiaries ignores the fact that the State seeks to invoke those rights only because DHHS failed to fulfill its obligation under 42 C.F.R. § 433.139(b)(1) to reject claims submitted on behalf of Medicaid recipients that it knew, or should have known, were also eligible for Medicare.
Our analysis of Subpart F as a whole reinforces this conclusion. The term “overpayment” only applies to amounts required to be refunded under section 1903 of the Social Security Act, and section 1903 nowhere requires providers to refund Medicaid reimbursements made on behalf of Medicaid recipients for whom Medicare coverage is available but has not been claimed. To the contrary, in the context of third-party liability, the statute limits the definition of “overpayment” to Medicaid payments to providers for which the state “has been reimbursed .. .by a third party.” 42 U.S.C. § 1396b(d)(2)(B) (emphasis added); see also Leavitt, 428 F.3d at 142 (“When Medicare covers services already paid for by Medicaid, Medicare pays the provider for the services, and then Medicaid can seek reimbursement from the provider for Medicaid’s initial erroneous payment.”). Because DHHS has not been reimbursed by any third party for the disputed expenditures, its payments to pharmacy providers are not overpayments as that term is defined in the Medicaid statute and regulations.
At oral argument, the State made much of the pharmacy providers’ failure to use the telephonic AVR system to determine whether Medicaid recipients were also covered by Medicare. However, the State cites no legal authority for the proposition that a provider’s failure to ascertain the availability of third-party coverage entitles a state Medicaid agency to seek reimbursement from the provider rather than from the third party.
Moreover, on the facts of this case, the providers appear to have had no way of knowing that use of the AVR system was necessary for them to comply with their obligation to take reasonable measures to ascertain the availability of third-party coverage. The May 13, 1994 billing manual indicated that providers could determine the availability of third-party coverage “through a Point of Sale device ... or by accessing the Automated Voice Response.” (Emphasis added.) The September 14, 2001 First Health memorandum to pharmacy providers “strongly encourag[ed] *661POS claims submission for its benefits,” and both that memorandum and the October 1, 2001 follow-up memorandum informed providers that “[d]esignated supplies ... may be submitted on-line” and that “[c]laims for coordination of benefits where NH Medicaid is not the primary payer will be processed on-line.” The October 23, 2001 First Health “Program Particulars” document reaffirmed that “[m]ost supplies may be submitted on-line,” and while that document also stated that providers were obligated to bill Medicare when a patient had Medicare coverage on the day of service, it did not indicate that providers could not rely upon the POS system to determine the availability of Medicare coverage. Finally, the September 2002 bulletin explained that the AVR System was “a tool that can be utilized in your office to: ... [o]btain other insurance information,” (emphasis added), but did not indicate that the AVR system was the only source of information from DHHS on Medicare coverage available to Medicaid recipients. Based upon the record, there is simply no indication that providers were given any warning that the POS system could not provide information on Medicare participation — and strong evidence that they were encouraged to rely upon the POS system for that very purpose — and there is also no indication that providers were ever warned that they had to rely upon the AVR system to comply with their obligation to determine whether the Medicaid recipients they served were also Medicare participants.
Finally, the State relies upon the CMS letter which, in its view, authorized DHHS’s recoupment procedure. That letter provided, in pertinent part:
[N]either the Medicare nor Medicaid statute, nor HHS’s regulations or policies prohibit any state from recouping its Medicaid payment from providers in the situation[] where:... a beneficiary, beneficiary representative, or state (as the beneficiary’s subrogee) timely requests the provider to file a claim with Medicare and the provider fails to submit timely a complete claim to Medicare for the service at issue____
According to the State, the CMS letter is an agency interpretation of an enabling statute to which we owe great deference. We do not agree.
Under either the standards we have articulated when considering state agency interpretations of state statutes, see, e.g., In re Juvenile 2004-789, 153 N.H. 332, 338 (2006), or the United States Supreme Court’s familiar Chevron standard for considering federal agency interpretations of federal statutes, see Chevron U.S.A. v. Natural Res. Def. Council, 467 U.S. 837, 842-45 (1984), we owe no deference to the CMS letter because it is legally erroneous. While that letter stated that nothing in the Medicaid or *662Medicare statutes or regulations prohibited a state from using the recoupment process to recover from providers Medicaid payments made on behalf of dual eligibles, 42 C.F.R. § 433.310(b)(1) expressly provides that the subpart pertaining to recovery of Medicaid overpayments to providers does not apply to cases, such as this, involving third-party liability. There is no legal standard that requires us to give deference to an agency interpretation that countermands a duly promulgated regulation.
For the reasons stated above, we conclude that DHHS had no legal authority to withhold payments from Medicaid providers as a method of recóuping Medicare reimbursements it was obligated to collect directly from Medicare. Accordingly, we hold that the commissioner’s declaratory ruling was erroneous as a matter of law. But that is all we hold. Notwithstanding the petitioners’ request to be made whole, the commissioner issued only a declaratory ruling, and only the lawfulness of that declaratory ruling is before us. Any claim for payment from DHHS is for another day, another court and another action.
Because the commissioner’s ruling was legally erroneous, the petitioners are entitled to a writ of certiorari declaring it so.
Petition granted.
Dalianis, Duggan, Galway and Hicks, JJ., concurred.