This action is before us on appeal from a judgment entered in the United States District Court for the District of Connecticut, Blumenfeld, J, granting plaintiffs’ motion for attorneys’ fees pursuant to the Equal Access to Justice Act, 28 U.S.C. § 2412 (1982) (EAJA). The court held that the government’s position in litigation was not substantially justified so that a fee award to plaintiffs was proper. Because we disagree with the court’s conclusion, we reverse. We also dismiss plaintiffs’ cross-appeal concerning the amount and calculation of the award.
I
This case represents the final chapter in a lengthy series of actions concerning federal housing subsidies. Because the issue ■before us is a limited one — whether the district court’s award of fees was proper — a brief review of the facts will suffice. *916The complete factual and procedural history of the underlying actions has been exhaustively covered in a number of prior opinions. See Dubose v. Pierce, 579 F.Supp. 937, 941-46 (D.Conn.1984) (Dubose V); Dubose v. Harris, 82 F.R.D. 582, 583-85 (D.Conn.1979) (Dubose IV); Dubose v. Harris, 434 F.Supp. 227, 228-30 (D.Conn. 1977) (Dubose III)) Dubose v. Hills, 22 Fed.R.Serv.2d 476, 477 (D.Conn.1976) (Dubose II)) Dubose v. Hills, 405 F.Supp. 1277, 1280-82 (D.Conn.1975) (Dubose I), modified on other grounds, 420 F.Supp. 399 (D.Conn.1976).1
Section 236 of the National Housing Act, 12 U.S.C. § 1715z-1 (1982), provides for financial assistance to owners of low income housing projects. In 1974 Congress modified this program through passage of the Housing and Community Development Act of 1974 (HCDA), Pub.L. No. 93-383, 88 Stat. 633. Among the changes instituted by HCDA was the addition of § 1715z-1(f)(3)(A) (1976), repealed by Omnibus Budget Reconciliation Act of 1981, Pub.L. No. 97-35, § 322(f)(7), 95 Stat. 403. Section 1715z-l(f)(3)(A) amended HCDA’s operating subsidy program to allow the Secretary of Housing and Urban Development (HUD) to make “additional assistance payments to the project owner in an amount up to the amount by which the sum of the cost of utilities and local property taxes exceeds the initial operating expense level.” 12 U.S.C. § 1715z-1(f)(3)(A) (1976). These payments were intended to protect tenants in low income housing from rent boosts that would otherwise result from increases in property taxes and utility costs.
This subsidy program was not implemented. Instead, HUD allowed owners to pass cost increases along to tenants as higher rents. The Secretary believed that implementation of the program was discretionary and that the agency could choose to use its funds in other ways.
The underlying action followed. In 1975 Judge Blumenfeld granted the tenants’ motion for a preliminary injunction ordering the Secretary to implement the program. Dubose I, 405 F.Supp. at 1292-93. Rather than appealing that decision, HUD concentrated its opposition on projects other than those covered by the injunction. In May 1976, after additional suits were filed, the court certified a statewide class of project-plaintiffs and ordered HUD to pay subsidies to all projects in Connecticut. Dubose II, 22 Fed.R.Serv.2d at 477-79.
In June 1976, the United States District Court for the District of Columbia issued a permanent injunction ordering HUD to pay the subsidies for nationwide housing projects. Underwood v. Hills, 414 F.Supp. 526, 532 (D.D.C.1976). That injunction was stayed by the Supreme Court pending appeal. 429 U.S. 892, 97 S.Ct. 250, 50 L.Ed.2d 175 (1976) (action of whole Court). In 1977 the Supreme Court granted certiorari in two related cases, Harris v. Abrams and Harris v. Ross, 431 U.S. 928, 97 S.Ct. 2630, 53 L.Ed.2d 243 (1977). See Abrams v. Hills, 547 F.2d 1062 (9th Cir.1976), vacated sub nom. Pierce v. Abrams, 455 U.S. 1010, 102 S.Ct. 1700, 72 L.Ed.2d 127 (1982), and Ross v. Community Services, Inc., 405 F.Supp. 831 (D.Md.1975), aff'd, 544 F.2d 514 (4th Cir.1976), vacated sub nom. Pierce v. Ross, 455 U.S. 1010, 102 S.Ct. 1700, 72 L.Ed.2d 127 (1982).
Before those cases could be heard, the parties in the related actions agreed to a settlement. Under this agreement, HUD was to pay into the Underwood Court a settlement fund from which eligible tenants were to receive retroactive tax and utility cost subsidy payments. See Stipulation for Settlement, reprinted as Appendix to Dubose IV, 82 F.R.D. at 592-605 (Stipu*917lation). The Stipulation also required that the underlying cases were to remain active until settlement administration was completed. Stipulation, 82 F.R.D. at 598 ¶ 17. This settlement was approved by the Connecticut district court. Dubose IV, 82 F.R.D. at 588-92.
During the settlement administration process, the Equal Access to Justice Act, 28 U.S.C. § 2412 (1982) (EAJA), was passed. The relevant provision of EAJA states:
[ejxcept as otherwise specifically provided by statute, a court shall award to a prevailing party ... fees and other expenses ... incurred by that party in any civil action ... brought by or against the United States ..., unless the court finds that the position of the United States was substantially justified or that special circumstances make an award unjust.
28 U.S.C. § 2412(d)(1)(A) (emphasis added).
The plaintiffs in both the Connecticut action and in certain California actions moved for fees pursuant to section 2412(d)(1)(A). Both courts ruled in favor of the plaintiffs, holding that the government had failed to establish either of the statutory defenses to the awarding of fees. Du-bose V, 579 F.Supp. at 948-52; Underwood v. Pierce, 547 F.Supp. 256, 261-64 (C.D.Cal. 1982), appeal pending No. 83-5773 (9th Cir.).
In the instant case, Judge Blumenfeld held that HUD’s position was not “substantially justified” under EAJA. The court noted that the fact that the government was not ultimately successful would not lead ineluctably to the conclusion that HUD’s position was unjustified. Instead, the court evaluated the “reasonableness” of the agency’s litigation position. The court held that “HUD’s position was not merely unreasonable but had no justifiable basis,” Dubose V, 579 F.Supp. at 950, and that the government’s assertion that “special circumstances” made an award unjust, 28 U.S.C. § 2412(d)(1)(A), was similarly unavailing. HUD insisted that because the settlement agreement barred payment of attorneys’ fees from the fund, which was the only possible source of fees at the time, any award of fees was thereby barred. The court rejected this argument, holding that an award of fees was proper under EAJA despite the terms of the settlement agreement.
II
Because we believe that the government’s position was substantially justified, we reverse the judgment of the district court. We therefore need not consider the effect of the settlement agreement provision that barred the use of the fund for attorneys’ fees.
The district court’s determination that HUD’s position was not plausible should be viewed as a conclusion of law, Spencer v. NLRB, 712 F.2d 539, 563 (D.C. Cir.1983), cert. denied, — U.S. -, 104 S.Ct. 1908, 80 L.Ed.2d 457 (1984), and subject to de novo review. Boudin v. Thomas, 732 F.2d 1107, 1117 (2d Cir.1984).
The definition of “position” under EAJA is settled in this Circuit. In Boudin we determined that the term refers to the government’s position in litigation rather than its actions during the underlying administrative proceedings. Boudin, 732 F.2d at 1115-16. Therefore, we may consider only HUD’s litigating posture in our examination of justification.
The government bears the burden of proving that its action as a litigant was substantially justified. Environmental Defense Fund, Inc. v. Watt, 722 F.2d 1081, 1087 (2d Cir.1983); Spencer, 712 F.2d at 557; Ellis v. United States, 711 F.2d 1571, 1575 (Fed.Cir.1983); Dougherty v. Lehman, 711 F.2d 555, 561-62 (3d Cir.1983); H.R.Rep. No. 1418, 96th Cong., 2nd Sess. 10, reprinted in 1980 U.S.Code Cong. & Ad.News 4953, 4984, 4989. “The test of whether or not a Government action is substantially justified is essentially one of reasonableness. Where the Government can show that its case had a reasonable basis both in law and fact, no award will be made.” H.R.Rep. No. 1418 at 10, 1980 *918U.S.Code Cong. & Ad.News at 4989. See also Environmental Defense Fund, 722 F.2d at 1085; Tyler Business Services, Inc. v. NLRB, 695 F.2d 73, 76 (4th Cir.1982) (absence of rational explanation for gap in proof results in finding of absence of justification).
Plaintiffs prevailed in the underlying action in the district court because the court rejected Secretary Hills’ claim that her refusal to implement the operating subsidy program was a valid exercise of discretion. Dubose I, 405 F.Supp. at 1288-92. HUD’s litigation position was premised on its belief that, under the National Housing Act, the agency had discretion to choose the ways in which it would implement national housing policy. In support of its position, HUD relied on Pennsylvania v. Lynn, 501 F.2d 848 (D.C.Cir.1974). In Lynn the D.C.Circuit held that Secretary Romney had discretion to terminate a number of housing programs and that he had not abused his discretion in so doing, because he believed that the legislative purposes were not served by these programs.
Secretary Hills, defendant’s predecessor, argued before the district court that she had discretion as to the implementation of the operating subsidy program based on the language and legislative history of the Act and on Congress’ subsequent funding decisions. She also argued that her lawful discretion over the allocation of her contract authority permitted her to refuse to fund the operating subsidies. We are concerned not only with the substantive accuracy of this position as viewed by hindsight, but also with the agency’s legal justification for its actions throughout the litigation.
We are convinced that HUD has borne its burden of proving that its litigation position, albeit ultimately unsuccessful, was not unreasonable. Our analysis of this “borderline” case is aided by our examination of the factors developed by the Spencer Court. United States v. 2,116 Boxes of Boned Beef, 726 F.2d 1481, 1486 n. 11 (10th Cir.1984), cert. denied, — U.S. -, 105 S.Ct. 105, 83 L.Ed.2d 49 (1984); Foley Construction Co. v. United States Army Corps of Engineers, 716 F.2d 1202, 1204 (8th Cir.1983), cert. denied, — U.S. -, 104 S.Ct. 1908, 80 L.Ed.2d 457 (1984). These factors are: the clarity of the governing law, the foreseeable length and complexity of the litigation and the consistency of the government’s position. Spencer, 712 F.2d at 559-61.
1. Clarity of the Governing Law
The government’s position must be evaluated according to the legal justification for its posture throughout the litigation rather than by hindsight after later judicial interpretations of the issues involved. See Devine v. Sutermeister, 733 F.2d 892, 895 (Fed.Cir.1984). At the time the underlying action was filed, the D.C. Circuit’s conclusion in Lynn, the only judicial guidance available, offered no hint of the ultimate outcome of the subsequent cases. In preparing its litigation stance the government relied on arguments similar to those which had succeeded in Lynn. The district court admitted that it initially found Lynn to be relevant. Dubose V, 579 F.Supp. at 950-51.
The district court’s reevaluation of its earlier view of the justification for the government’s position ignores the requirement that we consider HUD’s perspective as the agency developed its trial and appeal strategy. The factors that the court later found persuasive in distinguishing Lynn were not so obvious at that stage. The governing law, to the extent that it existed, did not mandate HUD’s surrender early in the litigation. Although HUD’s position became more questionable as adverse trial and appeal decisions accumulated, we cannot say that the tally ever became so one-sided as to render HUD’s position clearly unjustifiable.
Thus, the first of the Spencer factors, the clarity of the governing law, tilts in favor of HUD. See Cornelia v. Schweiker, 741 F.2d 170, 172 (8th Cir.1984) (where all legal issues were questions of first impression in circuit, agency’s action in seeking clarification from courts was reason*919able); Boudin, 732 F.2d at 1116 (law on issue in question was not clear at time of suit; government’s position was reasonable). Cf. Hoang Ha v. Schweiker, 707 F.2d 1104, 1106 (9th Cir.1983) (case previously decided, adverse to government’s position, is factor in assessing reasonableness, but cases from other circuits are not conclusive); Wyandotte Savings Bank v. NLRB, 682 F.2d 119, 120 (6th Cir.1982) (fact that government’s position was contrary to prior Sixth Circuit precedent did not mean that it was not substantially justified; fees denied).
2. Foreseeable Length and Complexity of Litigation
The Spencer Court stated:
Sensitivity to the central objective of the Act — reduction of the deterrents to challenges of unreasonable government conduct — thus suggests that, in categories of cases in which substantial investments of effort and money commonly are required to prosecute suits to their ultimate conclusions, the government should be obliged to make an especially strong showing that its persistence in litigation was justified.
712 F.2d at 560.
This factor adds little to our analysis. While this litigation has certainly been long and complex, spanning some ten years and several circuits, we find no indication that the government’s behavior deterred aggrieved tenants from filing suits. Indeed, the government paid the subsidies that were ordered in the December 1975 and May 1976 injunctions until operation of the May 1976 injunction was stayed by this Court. See Dubose III, 434 F.Supp. at 230; see also 429 U.S. 1085, 97 S.Ct. 1092, 51 L.Ed.2d 531 (1977) (action by whole court refusing to vacate stay issued by Second Circuit).2
Moreover, simple reliance on the length of the litigation in this case is deceptive. The settlement negotiations and fee motions have been proceeding since 1977. Neither of these developments was foreseeable at the outset of the litigation. We find no reason to include this case in the category described by the Spencer Court. Hence we decline to impose on HUD the burden of making an “especially strong showing” of justification merely because the litigation has been long-lived. We conclude that, at most, this factor provides little benefit to either party.
We note also that the foreseeable complexity of the litigation is closely tied to the first factor, the clarity of the governing law. Where, as here, the government’s position appeared at first to be supported by persuasive case law, the government should not be penalized for defending a suit which becomes long, complex and eventually unsuccessful.
3. Consistency of the Government’s Position
The Spencer Court suggested that where the government acts to single out one private party as the victim of an inconsistent interpretation, the government’s unpredictability should be penalized. Spencer, 712 F.2d at 560-61. Here, by contrast, the plaintiffs cannot argue that they were “subjected to atypically harsh treatment.” Id. at 561. It has been clear throughout the history of this litigation that the Secretary had no intention of paying any operating subsidies unless those payments were made in response to court orders. This factor, then, clearly supports a denial of legal fees.
In sum, the Spencer factors alone demonstrate that HUD’s litigation position was substantially justified. But we need not rely exclusively on those factors. Additional considerations lead to the same result.
The district court also refused to credit either the stays issued by this Court and the Supreme Court, or the Supreme Court’s grant of certiorari in two related cases, *920suggesting that those events were “too opaque” to lend credence to a conclusion that HUD’s position was justified. As to the former, the court found no indication that the Supreme Court’s grant of a stay indicated any view as to the merits; our subsequent issuance of .a stay was dismissed with the suggestion that we “had little choice but to grant one.” Dubose V, 579 F.Supp. at 950. And as to the latter, the court suggested that the Supreme Court might have granted certiorari in those two cases, both of which had ruled against the government, in order to affirm the lower court’s rejection of HUD’s position. Id. We reject this reasoning.
“A court in staying the action of a lower court ... must take into account factors such as irreparable harm and probability of success on the merits.” Coleman v. Paccar, Inc., 424 U.S. 1301, 1305, 96 S.Ct. 845, 847, 47 L.Ed.2d 67 (Rehnquist, Circuit Justice, 1976) (granting motion to vacate stay; citing O’Brien v. Brown, 409 U.S. 1, 3, 92 S.Ct. 2718, 2719, 34 L.Ed.2d 1 (1972) (per curiam)). In this Circuit, in addition to considering the harm to the parties and the public interest, a court must find that the movant has demonstrated “a substantial possibility, although less than a likelihood, of success.” Hayes v. City University of New York, 503 F.Supp. 946, 963 (S.D.N.Y.), aff'd on other grounds sub nom. Hayes v. Human Resources Administration, 648 F.2d 110 (2d Cir.1981). See also In re Turner, 309 F.2d 69, 72 (2d Cir.1962). We find it unlikely that these criteria were overlooked by this Court simply because the Supreme Court had already acted. We see both stays as indicative of the courts’ view that the government’s position was not unreasonable.
The same is true of the Supreme Court’s grant of certiorari. Although the outcome of the Court’s examination of this situation was left forever in limbo by the settlement, we do not believe that the district court’s interpretation is the only plausible one. We believe that it is equally probable that the Court granted certiorari not to affirm but to reverse the lower court decisions. The district court cited its previous opinion as support for its conclusion that HUD’s conduct was “unreasonable [and] had no justifiable basis.” Dubose V, 579 F.Supp. at 950. However, the court’s prior opinion has little bearing on the instant determination because the first conclusion was not “made with an intent to resolve EAJA questions.” Cinciarelli v. Reagan, 729 F.2d 801, 806 (D.C.Cir.1984).
Similarly, the district court's suggestion that the numerous adverse rulings in the lower courts should lead to a different result does not convince us to overlook the many factors supporting our conclusion, particularly in light of the stays and grant of certiorari discussed above. Nor does the court’s suggestion that the government’s participation in the settlement represented an admission that the litigation was unjustified merit much analysis. Speculation as to the agency’s intent in settling adds little to our analysis. A holding that an agency’s decision to settle an appeal on terms favorable to the claimant undercuts the agency’s justification of its litigation position would discourage future settlements, a factor we should not lightly disregard. A litigation position that was justified, for EAJA purposes, before a settlement should not later lose its justification as a result of the settlement. After all, policy reasons quite apart from the merits of the dispute may, in the last analysis, dictate a premature termination of the litigation.
Ill
For the reasons stated above, we vacate the judgment of the district court and hold that the government has carried its burden of proving that its litigation position was substantially justified. In view of this determination, we need not reach the issue of whether the settlement agreement provision barring an award of fees from the fund affects a fee award under EAJA. We also need not reach the plaintiffs’ cross-appeal concerning the amount and calculation of fees. The cross-appeal is dismissed. We remand to the district court for entry *921of an order dismissing the complaint.3 No costs on appeal.
. In addition to the actions in the District of Connecticut, related suits were filed in other parts of the country, including the District of Columbia, Maryland and California. See Abrams v. Hills, 547 F.2d 1062 (9th Cir.1976), vacated sub nom. Pierce v. Abrams, 455 U.S. 1010, 102 S.Ct. 1700, 72 L.Ed.2d 127 (1982); Underwood v. Hills, 414 F.Supp. 526 (D.D.C. 1976); Ross v. Community Services, Inc., 405 F.Supp. 831 (D.Md.1975), aff'd, 544 F.2d 514 (4th Cir.1976), vacated sub nom. Pierce v. Ross, 455 U.S. 1010, 102 S.Ct. 1700, 72 L.Ed.2d 127 (1982). For other related cases, see Dubose v. Harris, 82 F.R.D. 582, 585 n. 12 (D.Conn. 1979).
. Our stay was issued after that ordered by the Supreme Court, 429 U.S. 892, 97 S.Ct. 250, 50 L.Ed.2d 175 (1976) (action by whole Court), in Underwood v. Hills, 414 F.Supp. 526 (D.D.C. 1976).
. The government argued before the district court that the actions were not "pending” on the effective date of the EAJA and that EAJA did not permit an award of fees for work performed prior to that date. These arguments have been abandoned on appeal.