Opinion by Judge IKUTA; Partial Concurrence and Partial Dissent by Judge RAWLINSON.
OPINION
IKUTA, Circuit Judge:The Sonoma County Association of Retired Employees (Association) sued Sono-ma County, alleging that the County had breached its obligation to provide certain vested healthcare benefits in perpetuity. Although the County had not expressly promised to provide these benefits, the Association alleged that it had implicitly done so. The California Supreme Court’s recent decision in Retired Employees Ass’n of Orange County, Inc. v. County of Orange (REAOC II) recognized that a county may form a contract with implied terms under specified circumstances. 52 Cal.4th 1171, 134 Cal.Rptr.3d 779, 266 P.3d 287, 289 (2011). In light of REAOC II, the district court erred in dismissing the Association’s complaint with prejudice.
I
This case arises from the County’s efforts to reduce its liability for its retired employees’ healthcare benefits, which it has subsidized since at least 1964. In 2007, the County became concerned about the rapidly rising costs of healthcare benefits, which had doubled since 2002. In August 2008, the County’s Board of Supervisors enacted a resolution to limit the County’s healthcare benefit contributions to $500 per month for retirees, with a five-year phase-in period. The Association, representing retired County employees, filed suit against the County in 2009 on the ground that the County’s August 2008 resolution amounted to a breach of both express and implied contracts, and raised numerous other claims including breach of the covenant of good faith and fair dealing, violations of the Contract Clauses of the California and United States Constitutions, promissory estoppel, and violation of due process.
The Association’s original complaint alleged that, in connection with providing healthcare benefits for retirees over the course of many decades, the County made two different promises to the retirees. First, beginning in at least 1964, the County promised to pay “all or substantially all” of the costs of post-retirement healthcare benefits for its retirees and their dependents. Second, in 1985, the County entered into a “tie agreement,” which promised that the County would treat retirees and their dependents the same as it treated the active management employees with respect to healthcare benefits and the County’s payment of costs. The complaint alleged that these promises, and the employees’ performance of services in exchange for these promises, created a legally binding contract. The Association further alleged that the County intended these promises to create healthcare benefits that would continue during the lives of the retirees and their dependents.
*1113In its May 14, 2010 order, the district court dismissed the Association’s complaint with leave to amend. The district court explained that as a matter of California law, oral promises and other extrinsic evidence standing alone could not contractually bind the County in the context of public employment. Accordingly, the district court rejected the Association’s claim that the County’s “set of promises over the years ... in writing, orally, and as applied through practice” created an implied contract. Because the Association had not identified resolutions or ordinances that created an express contract for healthcare benefits, the district court held that the Association’s good faith and fair dealing claim, Contract Clauses claims, and due process claims also failed. Finally, the district court rejected the complaint’s promissory estoppel claim on the ground that the Association could not have reasonably relied on the County’s implied promises.
While this case was pending, another Ninth Circuit panel considered a case raising similar issues. See Retired Emps. Ass’n of Orange Cnty. Inc. v. Cnty. of Orange, 610 F.3d 1099 (9th Cir.2010) (REAOC I). In that case, a group of retired county employees sued the county for changing its longstanding practice of subsidizing retiree healthcare benefits on the ground that the county’s long-standing practice created an implied contract. The district court in that case granted summary judgment in favor of the county, because the county “cannot be liable for any obligation that it did not enter through explicit Board resolution.” Id. at 1101-02. Because the question whether the retired employees and the county had entered into an enforceable contract was a question of state law, the REAOC I panel certified the following question to the California Supreme Court: ‘Whether, as a matter of California law, a California county and its employees can form an implied contract that confers vested rights to health benefits on retired county employees.” Id. at 1101.
While the certified question from REAOC I was pending before the California Supreme Court, the Association filed an amended complaint in this case, asserting the same causes of action as in the original complaint, but adding more facts and attaching copies of the sixty-eight resolutions, memoranda of understanding (MOUs), and ordinances on which it relied. The Association also stated it would provide evidence of the County’s intent to provide vested healthcare benefits through testimony of the employees who drafted the County’s resolutions and policies, and through a member of the Board of Supervisors, who would testify as to the Board’s promises and intent to provide benefits.
On November 23, 2010, the district court granted the County’s motion to dismiss the Association’s amended complaint, this time without leave to amend. The court noted that none of the documents adduced by the Association in connection with its complaint contained the County’s express agreement to provide healthcare benefits to retirees in perpetuity, which the court had previously held was necessary to form a binding contract between the County and retirees in this context. Given the Association’s failure on this second try to provide any evidence of an express agreement, the district court denied the Association leave to amend. In a footnote, the court acknowledged the certified question in REAOC I was pending before the California Supreme Court, but did not consider it because both parties had indicáted that the certified issue was not relevant.
The Association appealed both the November 2010 order and the May 2010 order, which became final and appealable *1114when the district court dismissed the case without leave to amend. See Montes v. United States, 37 F.3d 1347, 1351 (9th Cir.1994).
II
While this appeal was pending, the California Supreme Court issued an opinion responding to the certified question posed by the Ninth Circuit in REAOC I. In REAOC II, the court considered three different issues: (1) whether a county government and its employees can form an implied contract for compensation; (2) if such contracts are cognizable, whether implied contracts can create irrevocable or “vested” rights; and (3) if vested contractual rights for county employees can be implied, whether such rights can include healthcare benefits. See REAOC II, 134 Cal.Rptr.3d 779, 266 P.3d at 291.
Turning to the first question, the court held that “a county may be bound by an implied contract (or by implied terms of a written contract), as long as there is no statutory prohibition against such an agreement.” Id. 134 Cal.Rptr.3d 779, 266 P.3d at 294. The court decided that it need not determine whether the county “may form an implied contract with its employees on matters of compensation” because the retirees took the position that they had an express contract and were “seeking recognition only of an implied term,.” Id. 134 Cal.Rptr.3d 779, 266 P.3d at 295 (first emphasis added). According to the court, implied terms “stand on equal footing with express terms,” so long as they do not conflict with the express terms. Id. 134 Cal.Rptr.3d 779, 266 P.3d at 290 (internal quotation marks omitted).
The court then considered the extent to which section 25300 of the California Government Code, which authorizes a public entity to enter into a compensation contract only by ordinance or resolution, constituted a “statutory prohibition” against implied agreements or implied terms in the public employment context.1 See id. 134 Cal.Rptr.3d 779, 266 P.3d at 294. According to the court, section 25300 did not completely prohibit implied agreements or terms, because “contractual rights can be implied from legislative enactments under limited circumstances.” Id. 134 Cal.Rptr.3d 779, 266 P.3d at 295. The court explained that an ordinance or resolution can create a contract when the legislation’s text or the “circumstances accompanying its passage” clearly evince an intent to contract, as opposed to an intent to make policy. Id. 134 Cal.Rptr.3d 779, 266 P.3d at 296. Although the public entity’s intent to create a contract must be clear, the intent need not be express. Id. The California Supreme Court gave some examples of when legislation may create a contract. For example, if “the legislation is itself the ratification or approval of a contract, the intent to make a contract is clearly shown.” Id. Alternatively, legislation creates a contract if it “contains an unambiguous element of exchange of consideration by a private party for consideration offered by the state.” Id. (citing Cal. Teachers Ass’n v. Cory, 155 Cal.App.3d 494, 505, 202 Cal.Rptr. 611 (Cal.Ct.App.1984)).
Having concluded that a court can infer contractual rights from legislation when the legislature’s intent is clear, the court then considered whether it was “impermissible to infer vested contractual rights.” *1115Id. 134 Cal.Rptr.3d 779, 266 P.3d at 297. The court determined that this too was a matter of the parties’ intent. Id. 134 Cal.Rptr.3d 779, 266 P.3d 287 at 298. “[A]s with any contractual obligation that would bind one party for a period extending far beyond the term of the contract of employment, implied rights to vested benefits should not be inferred without a clear basis in the contract or convincing extrinsic evidence.” Id. 134 Cal.Rptr.3d 779, 266 P.3d at 299. Therefore, plaintiffs have a particularly “heavy burden” to demonstrate “the legislative body’s intent to create vested rights.” Id. 134 Cal.Rptr.3d 779, 266 P.3d at 298 (internal quotation marks omitted).
Finally, the court considered the County’s arguments that various other statutes prohibited public entities from including implied terms relating to healthcare benefits in employment contracts. The court rejected each of these arguments based on a close reading of the specific terms of the statute. See id. 134 Cal.Rptr.3d 779, 266 P.3d at 299-301.
The California Supreme Court concluded that “under California law, a vested right to health benefits for retired county employees can be implied under certain circumstances from a county ordinance or resolution.” Id. 134 Cal.Rptr.3d 779, 266 P.3d at 301. However, the court declined to reach the merits of the case, stating that “[wjhether those circumstances exist in this case is beyond the scope of the question posed to us by the Ninth Circuit.” Id.
Ill
We now consider the Association’s appeal from the dismissal of its complaint in light of the guidance provided by REAOCII2 “We review de novo the dismissal of a complaint for failure to state a claim.” Telesaurus VPC, LLC v. Power, 623 F.3d 998, 1003 (9th Cir.2010). While a complaint does not require “detailed factual allegations,” it “must contain sufficient factual matter, accepted as true, to state a claim to relief that is plausible on its face.” Ashcroft v. Iqbal, 556 U.S. 662, 678, 129 S.Ct. 1937, 173 L.Ed.2d 868 (2009) (internal quotation marks omitted). The plausibility standard “is not akin to a ‘probability requirement,’ but it asks for more than a sheer possibility that a defendant” is liable. Id. “A claim has facial plausibility when the plaintiff pleads factual content that allows the court to draw the reasonable inference that the defendant is liable for the misconduct alleged.” Id.
A
Here, in order to survive a motion to dismiss, the Association’s complaint must plausibly allege that the County: (1) entered into a contract that included implied terms providing healthcare benefits to retirees that vested for perpetuity; and (2) created that contract by ordinance or resolution. See REAOC II, 134 Cal.Rptr.3d 779, 266 P.3d at 289.
The Association met the first requirement by plausibly alleging that: (1) the County entered into a contract; (2) the contract provided healthcare benefits to retirees; and (3) the contract included an implied term that the benefits were vested for perpetuity. First, the complaint alleges that the County “conveyed its promises and intent to continuously and consistently provide vested retiree health benefits” in “Board-ratified Memoranda of Understanding,” among other documents. There is no doubt that the MOUs are contracts. As the California Supreme Court previously explained, “all modern California deci*1116sions treat labor-management agreements whether in public employment or private as enforceable contracts which should be interpreted to execute the mutual intent and purpose of the parties.” Glendale City Emps. Ass’n v. City of Glendale, 15 Cal.3d 328, 124 Cal.Rptr. 513, 540 P.2d 609, 616 (1975); see also REAOC II, 134 Cal.Rptr.3d 779, 266 P.3d at 293 (Where a county “negotiate^] and approve[s] MOUs with its employee bargaining units ... such agreements are binding and constitutionally protected.” (internal quotation marks omitted)).
The MOUs submitted with the amended complaint support the Association’s allegation that the MOUs promised healthcare benefits. Specifically, the documents state, among other things, that the County will make contributions toward a health plan premium for retirees hired after 1990 who have worked for the County for at least ten years, and have contributed to the County’s retirement system for the same length of time.3
The Association’s amended complaint also plausibly alleges that the County intended these healthcare benefits to vest for perpetuity. The complaint states that the County conveyed this intent “in writing, orally, by implication, and through practice.” The Association supported this allegation with factual matter, including: (1) MOUs, resolutions, and other documents establishing the County’s longstanding course of conduct; (2) allegations that former employees who drafted these documents would testify in support of the Association’s position regarding the “background, purpose, and intent” of the documents; and (3) statements that at least one former Board member would testify as to the County’s intent that the benefits vest in perpetuity.4
Taken as a whole, the amended complaint includes factual content that is non-conclusory, more than “merely consistent” with the County’s liability, and substantial enough to allow a court, accepting the allegations as true, to make a reasonable inference that the County implicitly bound itself to provide healthcare benefits to its retirees in perpetuity. See Iqbal, 556 U.S. at 678, 129 S.Ct. 1937 (internal quotation marks omitted).
But this is not enough to survive a motion to dismiss: the complaint must also plausibly point to a resolution or ordinance that created the contract implying *1117these benefits. See REAOC II, 134 Cal.Rptr.3d 779, 266 P.3d at 294. Specifically, the County’s resolutions and ordinances may create a contract if the text and the circumstances of their passage “clearly evince” an intent to grant vested benefits, id. 134 Cal.Rptr.3d 779, 266 P.3d at 296 (internal quotation marks omitted), or if they “contain[] an unambiguous element of exchange of consideration by a private party for consideration offered by the state.” Id. In the alternative, the County’s intent to make a contract by legislation “is clearly shown” when a resolution or ordinance ratifies or approves the contract. Id.
But here the amended complaint does not plausibly allege either alternative. The Association does not make allegations sufficient to establish that the resolutions, ordinances, and MOUs were the product of a bargained-for exchange of consideration. The complaint’s statement that the retirees performed services as employees in exchange for the County’s promise to confer vested healthcare benefits upon them is the sort of legal conclusion unsupported by factual matter that the Supreme Court rejected as inadequate in Iqbal. See 556 U.S. at 678, 129 S.Ct. 1937. Moreover, while the complaint alleged that the MOUs were “Board-ratified,” it did not allege that the Board ratified the MOUs by resolution or ordinance; nor did the Association submit copies of any such resolutions or ordinances with the amended complaint.5 Given REAOC II’s focus on the statutory requirement that compensation of county employees must be addressed in an ordinance or resolution, see 134 Cal.Rptr.3d 779, 266 P.3d. at 295 (citing Cal. Gov’t Code § 25300), the complaint’s passing references to Board ratification are an insufficient basis for a court to infer that the County enacted a resolution or ordinance that ratified the relevant MOUs. Accordingly, the district court did not err in concluding that the amended complaint failed to state a cause of action on this issue.
Nevertheless, in light of REAOC II, we cannot agree with the district court’s decision to deny the Association leave to amend on the ground that such amendment would be futile. In general, a court should liberally allow a party to amend its pleading. See Fed.R.Civ.P. 15(a); see also Owens v. Kaiser Found. Health Plan, Inc., 244 F.3d 708, 712 (9th Cir.2001) (“A district court shall grant leave to amend freely when justice so requires,” and “this policy is to be applied with extreme liberality.”)(internal quotation marks and citations omitted). Courts may decline to grant leave to amend only if there is strong evidence of “undue delay, bad faith or dilatory motive on the part of the movant, repeated failure to cure deficiencies by amendments previously allowed, undue prejudice to the opposing party by virtue of allowance of the amendment, [or] futility of amendment, etc.” Foman v. Davis, 371 U.S. 178, 182, 83 S.Ct. 227, 9 L.Ed.2d 222 (1962). “[T]he consideration of prejudice to the opposing party carries the greatest weight.” Eminence Capital, LLC v. Aspeon, Inc., 316 F.3d 1048, 1052 (9th Cir.2003).
These considerations weigh in favor of granting leave to amend here. We may grant leave to amend in situations *1118where the controlling precedents changed midway through the litigation. See, e.g., Moss v. United States Secret Service, 572 F.3d 962, 972 (9th Cir.2009) (granting plaintiffs leave to amend their complaint in light of Bell Atlantic Corp. v. Twombly, 550 U.S. 544, 127 S.Ct. 1955, 167 L.Ed.2d 929 (2007), which was decided after the plaintiffs brought suit). As a general rule, “[dismissal without leave to amend is improper unless it is clear, upon de novo review, that the complaint could not be saved by any amendment.” Polich v. Burlington Northern, Inc., 942 F.2d 1467, 1472 (9th Cir.1991). In light of REAOC II, the Association may be able to amend its complaint to state a claim that will survive a motion to dismiss, and so denial of leave to amend on the ground of futility is improper.6
Nor do any of the other Foman factors weigh against granting leave to amend. Although this litigation has been ongoing for several years, “[t]he mere fact that an amendment is offered late in the case ... is not enough to bar it.” United States v. Webb, 655 F.2d 977, 980 (9th Cir.1981) (quoting 3 Moore’s Federal Practice § 15.08(4) at 15-102). The County would not be prejudiced, because it should be “fully prepared to litigate the substantive issues” of the claim, given that both the theory and the operative facts of the claim remain the same. Hurn v. Ret. Fund Trust of Plumbing, Heating & Piping Indus. of S. Cal., 648 F.2d 1252, 1254 (9th Cir.1981). Moreover, there is no evidence or allegation of “undue delay, bad faith or dilatory motive” over the course of these proceedings. Foman, 371 U.S. at 182, 83 S.Ct. 227. Accordingly, we conclude that the Association should be given a second chance to amend its complaint in light of REAOC II.
B
The County raises two additional arguments which merit some discussion. First, the County argues that the Association waived its argument about the existence of implied terms because it informed the district court that the certified question in REAOC II was not relevant to this case, and did not raise this argument to the district court after filing its amended complaint. We disagree. As the Association correctly points out, our certified question to the California Supreme Court asked only whether employees could form an implied contract for healthcare benefits. See REAOC I, 610 F.3d at 1101. Based on this question, the Association could reasonably conclude that REAOC II would not address implied terms of express contracts, and therefore the opinion would not be relevant to the district court’s determination. The Association’s erroneous prediction does not preclude review here, given that the Association’s complaint preserved its claim that the County entered into contracts with implied terms. Cf. Sovak v. Chugai Pharm. Co., 280 F.3d 1266, 1270 (9th Cir.2002) (no invited error where party cited the wrong law as controlling but otherwise discussed applicable law); Portland Gen. Elec. Co. v. U.S. Bank Trust Nat’l Ass’n as Tr. for Trust No. 1, 218 F.3d 1085, 1089 (9th *1119Cir.2000) (finding that a question of law was preserved where parties had fully briefed the issue to the court, even though one party made an error of legal interpretation).
Further, the Association did not waive its argument regarding implied contract terms by failing to raise it again to the district court during the November 23, 2010 proceedings. The district court had rejected the Association’s implied contract theory in its May 2010 ruling dismissing the original complaint. The Association’s appeal of the May 2010 order is presently before this court, and the Association’s failure to raise the same argument a second time does not constitute a waiver. See Montes, 37 F.3d at 1351 (appellant could challenge first judgment on appeal following second and final judgment).
Second, the County argues that our recent decision in Harris v. County of Orange compels us to conclude that notwithstanding REAOC II, a plaintiff cannot claim vested benefits unless it can prove the existence of a contract with express terms. See 682 F.3d 1126, 1135 (9th Cir.2012). The County is mistaken. The retirees in Harris asserted two claims, one based on an implied promise to subsidize health insurance premiums for its retired employees via a pooling arrangement, and the other based on the county’s express promise in collective bargaining agreements to provide a monthly grant toward the cost of health insurance. See id. at 1129. Consistent with REAOC II, Harris remanded the claims based on the implied promise to the district court so that it could “assess those claims in light of the California Supreme Court’s opinion, and coordinate those claims with the REAOC litigation.” Id. at 1134. And, because the retirees had not brought all the relevant express terms before the court, Harris dismissed those claims with leave to amend. Id. Harris did not purport to rule on a theory premised on implied terms or to interpret or apply REAOC II in dismissing the claims based on the express written contract; therefore, it does not affect our analysis here.7
IV
The district court did not have the benefit of REAOC II, but in light of its clarification that a public entity in California can be bound by an implied term in a written contract under specified circumstances, we cannot say that the Association’s amendment of its complaint a second time would be futile. At a minimum, the Association may be able to plausibly allege that the County used resolutions or ordinances to ratify or approve MOUs that created contracts for healthcare benefits and included *1120implied terms vesting those benefits for perpetuity. Accordingly, it was error to dismiss the Association’s complaint without leave to amend.
Nevertheless, even if the Association can make allegations that survive a motion to dismiss, REAOC II also clarified that a plaintiff claiming the existence of a contract with implied terms carries the heavy burden of establishing, from statutory language or relevant circumstances, that the public entity intended to create a compensation contract by ordinance or resolution. It also bears the equally heavy burden of establishing that implied terms in that contract provide vested healthcare benefits. See 134 Cal.Rptr.3d 779, 266 P.3d at 295 (“[I]t is presumed that a statutory scheme is not intended to create private contractual or vested rights and a person who asserts the creation of a contract with the state has the burden of overcoming that presumption.” (internal citations and quotation marks omitted)). Further, a court considering such a claim must do so cautiously, and identify “a clear basis in the contract or convincing extrinsic evidence” establishing that a contract exists and clearly delineating the contractual obligation at issue. Id. 134 Cal.Rptr.3d 779, 266 P.3d at 299. We therefore remand to the district court for proceedings consistent with REAOC II.8
VACATED AND REMANDED.
. Cal. Gov't Code § 25300 states, in pertinent part: "The board of supervisors shall prescribe the compensation of all county officers and shall provide for the number, compensation, tenure, appointment and conditions of employment of county employees. Except as otherwise required by Section 1 or 4 of Article XI of the California Constitution, such action may be taken by resolution of the board of supervisors as well as by ordinance.”
. The parties have provided us with supplemental briefing on this issue.
. A provision in a typical MOU states: “Upon meeting [the conditions that the employee work and contribute for ten years] the County shall contribute for the retiree only the same amount towards a health plan premium as it contributes to an active single employee in the same manner and on the same basis as is done at the time for other retirees who were hired or rehired before July 1, 1990.”
. The dissent’s argument that the Association cannot rely on testimony from County Board members and administrators because such testimony is not a "cognizable substitute” for proof that a contract was created by "a resolution or ordinance formally enacted by a majority of the Board of Supervisors,” dis. op. at 1121 (quoting Harris v. Cnty. of Orange, 682 F.3d 1126, 1134 (9th Cir.2012) (emphasis omitted)) conflates two different issues. Although REAOC II reiterated that the compensation of public employees must be addressed by resolution or ordinance, see 134 Cal.Rptr.3d 779, 266 P.3d at 294 (citing Cal. Gov't Code § 25300), in those circumstances where the County intended to create a contractual obligation by resolution or ordinance, such a contract may include implied terms that can be inferred from ”[e]vidence derived from experience and practice." Id. at 290 (internal quotation marks omitted). Thus, if the Association plausibly alleges that the County created a contract by means of a formally enacted resolution which ratified an MOU, for instance, then the Association may introduce evidence of that contract’s implied terms, including testimony regarding the County's intent.
. While Board ratification may be equivalent to a Board resolution, see Dimon v. Cnty. of Los Angeles, 166 Cal.App.4th 1276, 83 Cal.Rptr.3d 576, 583-84 (2008) (holding that a resolution "is the mere expression of the opinion of the legislative body concerning some administrative matter for the disposition of which it provides,” and thus a board's oral approval of an MOU was "in effect, done by resolution”), the Association has not made this argument, and therefore we do not reach it here.
. The dissent's argument that amendment would be futile because the Association already had an opportunity to amend and failed to properly allege a contract for healthcare benefits, see dis. op. at 1122, does not account for REAOC II 's significant clarification of the circumstances when a public employee may enforce implied terms in an express contract for healthcare benefits. Indeed, our ruling today mirrors our ruling in Hams, where we remanded the retirees' claims that certain healthcare benefits were an implied term of the county's MOUs so that the district court could assess those claims in light of REAOC II. See 682 F.3d at 1130, 1134.
. The dissent’s assertion that Harris rejected the argument raised by the Association here is incorrect. See dis. op. at 1121-22. In Harris, we rejected the retirees' argument that certain MOUs expressly gave retirees a vested right to healthcare benefits in perpetuity, and noted that the MOUs at issue established a specific end date to healthcare benefits, see 682 F.3d at 1135 & n. 4 ("[O]ne MOU states: ‘This Memorandum of Understanding sets forth the terms of agreement reached ... for the period beginning July 23, 1993 through June 23, 1994.’ ”). In response to the retirees’ argument that "the durational clause in the MOUs is not an indication of when the terms of the MOUs expire,” and therefore would not preclude an inference that the county intended the healthcare benefits to continue in perpetuity, we noted that even if the retirees were correct, "the durational clause surely cannot be the source of a claim that the benefits survive indefinitely.” Id. at 1135. Here, by contrast, the express terms of the MOUs and resolutions at issue do not establish a specific end date to healthcare benefits, and the Association alleges that the right to healthcare benefits in perpetuity is an implied term of a contract, not an express contractual right.
. We grant the Association’s Motion To Take Judicial Notice of the Proposed Decision of the Public Employment Relations Board in SEIU, Local 1021 v. Cnty. of Sonoma, Case No. SF-CE-509-M and its Motion To Take Judicial Notice of Legislative History. We deny the Association’s Motion to Remand to District Court, its Motion to Expedite, and its Motion to Supplement the Record as moot in light of our opinion.