274 F.3d 1255 (9th Cir. 2001)
ROSARIO GUTIERREZ, PLAINTIFF-APPELLANT,v.JO ANNE BARNHART,* COMMISSIONER, SOCIAL SECURITY ADMINISTRATION, DEFENDANT-APPELLEE.
No. 00-17216
UNITED STATES COURT OF APPEALS FOR THE NINTH CIRCUIT
Argued and Submitted September 12, 2001Filed Dec. 20, 2001

Harvey P. Sackett, San Jose, California, and Geri N. Kahn, San Francisco, California, for the plaintiff-appellant.
R. Linda Cosme and Jeffrey H. Baird, Assistant Regional Counsel, Social Security Administration, San Francisco, California, for the defendant-appellee.
Appeal from the United States District Court for the Northern District of California D. Lowell Jensen, District Judge, Presiding D.C. No. CV-97-00531-DLJ
Before: Henry A. Politz,** William A. Fletcher and Raymond C. Fisher, Circuit Judges.
FISHER, Circuit Judge:


1
Rosario Gutierrez appeals the district court's denial of attorney fees under the Equal Access to Justice Act (EAJA), 28 U.S.C. §§ 2412(d), after she prevailed in her appeal in this court reversing the Social Security Administration's (SSA) denial of disability benefits. See Gutierrez v. Apfel, 199 F.3d 1048 (2000) (Gutierrez I). We hold that the district court abused its discretion in denying fees because (1) the government's underlying conduct, failing to follow its own regulations, was not substantially justified, and (2) the government's litigation position was not substantially justified even though the effect of noncompliance with the SSA's regulations was an issue of first impression in this Circuit.

I.

2
In any action brought by or against the United States, the EAJA requires that "a court shall award to a prevailing party other than the United States fees and other expenses. . . 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). An applicant for disability benefits becomes a prevailing party for the purposes of the EAJA if the denial of her benefits is reversed and remanded regardless of whether disability benefits ultimately are awarded. Shalala v. Schaefer, 509 U.S. 292, 300-02 (1993); Corbin v. Apfel, 149 F.3d 1051, 1053 (9th Cir. 1998) ("[A] party is eligible for fees under the EAJA if [she] wins at any intermediate stage in the proceedings -for instance, by obtaining a remand from the appeals court.").


3
In Gutierrez I, we reversed the ALJ's denial of disability benefits because the ALJ failed to follow SSA regulations regarding the evaluation of mental impairments. When evaluating the severity of mental impairments, the ALJ must follow a special procedure to "[i]dentify the need for additional evidence to determine impairment severity," "[c]onsider and evaluate functional consequences of the mental disorder(s) relevant to [the applicant's] ability to work " and "[o]rganize and present our findings in a clear, concise, and consistent manner." 20 C.F.R. §§ 404.1520a(a). Social Security regulation 20 C.F.R. §§ 404.1520a(d), at the time of the ALJ's decision, stated:


4
A standard document outlining the steps of this procedure must be completed by us in each case at the initial, reconsideration, administrative law judge hearing, and Appeals Council levels (when the Appeals Council issues a decision). . . . For all cases involving mental disorders at the administrative law judge hearing or Appeals Council levels, the standard document will be appended to the decision.


5
This form is referred to as a psychiatric review technique form (PRTF).


6
Gutierrez's application for disability benefits presented a colorable claim of mental impairment, including a report from her treating psychiatrist diagnosing her with "major depression with psychotic features . . . which have been present for some time," apparently "due to a sexual assault last year by her physician." The ALJ, relying upon the opinion of a nonexamining physician, found that Gutierrez had a severe mental disorder from March 1995 but it had not lasted, nor would it continue to last, for 12 continuous months.1 He did not fill out and attach a PRTF as required by the SSA's regulations.


7
We reversed the ALJ's decision and held that the failure to fill out and attach the PRTF required remand to the SSA "for proper evaluation and documentation of the claimant's mental impairments." Gutierrez I, 199 F.3d at 1051.2 This decision made Gutierrez a prevailing party for the purposes of the EAJA and she accordingly moved for attorney fees and costs under that statute. The district court denied the motion, finding that the government was substantially justified in defending the failure to fill out the PRTF because the Ninth Circuit had not ruled on the legal implications of such a failure.

II.

8
The decision whether to award fees under the EAJA, including the district court's conclusion that the government's position was substantially justified, is reviewed for abuse of discretion. Pierce v. Underwood, 487 U.S. 552, 559 (1988); Corbin, 149 F.3d at 1052. It is the government's burden to show that its position was substantially justified or that special circumstances exist to make an award unjust. Meinhold v. U.S. Dep't of Defense, 123 F.3d 1275, 1277 (9th Cir.), amended by 131 F.3d 842 (9th Cir. 1997); Love v. Realty, 924 F.2d 1492, 1495 (9th Cir. 1991).


9
A. Substantially justified.


10
"Substantially justified" means " `justified in substance or in the main' -that is, justified to a degree that could satisfy a reasonable person." Pierce, 487 U.S. at 565 (quoting Webster's New International Dictionary 2514 (2d ed. 1945)). A substantially justified position must have a reasonable basis both in law and fact. Id.; Flores v. Shalala, 49 F.3d 562, 569 (9th Cir. 1995) ("In this circuit, we apply a reasonableness standard in determining whether the government's position was substantially justified for purposes of the EAJA.").


11
The district court denied Gutierrez attorney fees under the EAJA because it found that "the government's decision to litigate cannot be found to be unreasonable" in light of the fact that "[t]he materiality of completing a PRTF form, at the time, was one of first impression in the Ninth Circuit." But we consider whether "the position of the government was, as a whole, substantially justified." United States v. Rubin, 97 F.3d 373, 376 (9th Cir. 1996) (emphasis added); Comm'r, INS v. Jean, 496 U.S. 154, 161-62 (1990) ("While the parties' postures on individual matters may be more or less justified, the EAJA . . . favors treating a case as an inclusive whole, rather than as atomized line-items.").


12
The plain language of the EAJA states that the " `position of the United States' means, in addition to the position taken by the United States in the civil action, the action or failure to act by the agency upon which the civil action is based." 28 U.S.C. §§ 2412(d)(2)(D); Jean , 496 U.S. at 159 (explaining that the "position" relevant to the inquiry "may encompass both the agency's prelitigation conduct and the [agency's] subsequent litigation positions"). Thus we "must focus on two questions: first, whether the government was substantially justified in taking its original action; and, second, whether the government was substantially justified in defending the validity of the action in court." Kali v. Bowen, 854 F.2d 329, 332 (9th Cir. 1988).


13
The district court erred in not addressing the reasonableness of the underlying conduct and basing its denial of fees solely on the government's litigation position. See Wilderness Society v. Babbitt, 5 F.3d 383, 388 (9th Cir. 1993) (holding that although "[t]he court was correct in finding that the [agency's] procedural litigation defense was substantially justified," it "erred . . . in ending its analysis at this point"). In order to prevail here, the government must establish that it was substantially justified on the whole, considering, first, the underlying conduct of the ALJ in failing to fill out and attach a PRTF to his findings and, second, its litigation position defending the ALJ's error.


14
1. Underlying agency conduct.


15
The underlying conduct in this case was a failure of the ALJ to follow SSA regulations requiring a PRTF to be completed and appended to the decision in cases requiring the evaluation of mental impairments. "[F]inding that an agency's position was substantially justified when the agency's position was based on violations of . . . the agency's own regulations, constitutes an abuse of discretion." Mendenhall v. NTSB, 92 F.3d 871, 874 (9th Cir. 1996) (holding that NTSB abused its discretion by finding FAA position substantially justified where it had violated its own policy orders). The government argues that the failure of the ALJ to fill out and attach the PRTF was substantially justified because the regulation requiring that form was unclear. We do not agree.


16
To support its argument that 20 C.F.R. §§ 404.1520a(d) was not clear, the government tries to find support in the SSA's decision, after Gutierrez I was decided, to amend the regulation no longer to require a PRTF as long as the required steps are carried out in the hearing. See Revised Medical Criteria for Evaluating Mental Disorders and Traumatic Brain Injury, 65 Fed. Reg. 50,746 (Aug. 21, 2000). This evidence is wholly irrelevant, however, because we are concerned with "the underlying government conduct at issue and the totality of circumstances present before and during litigation." Barry v. Bowen, 825 F.2d 1324, 1330 (9th Cir. 1987) (emphasis added). The regulation in force before and during litigation stated that a PRTF "must be completed" and"will be appended to the decision." There was nothing ambiguous about this requirement. The ALJ's failure to follow SSA regulations requiring a PRTF to be completed and appended to its decision was not substantially justified.


17
2. Litigation position.


18
The government argues that an award of fees is nevertheless inappropriate because the district court was correct in finding that its litigation position was substantially justified. It states that given the lack of Ninth Circuit precedent on the effect of not following the regulations prior to Gutierrez I, "the Commissioner reasonably chose to litigate to clarify the law, relying on a persuasive Eighth Circuit case for guidance." The "persuasive" Eighth Circuit decision on which the government predicated its litigation position is Fountain v. R.R. Ret. Bd., 88 F.3d 528 (8th Cir. 1996). In that case, however, the court held that a failure of the Railroad Retirement Board to complete a PRTF "fits within that small category of cases in which the failure to complete a PRTF is harmless error." Id. at 532. The government was not reasonable in its attempt to fit the ALJ's failure to complete a PRTF for Gutierrez into the same "small category."


19
To begin with, Fountain was not a Social Security case. The Railroad Retirement Board operates under the strictures of the Railroad Retirement Act (RRA). The court in Fountain expressly noted that the RRA is "analogous to the disability provisions of the Social Security Act," id. at 530, except that "the Board is not technically mandated to complete the [PRTF]," id. at 532 n.5. See also id. at 531 ("Where there is evidence of a medically determinable mental impairment, a hearing officer . . . is urged to complete a Psychiatric Review Technique Form.") (emphasis added). Although Fountain is distinguishable on other grounds, that it did not involve an explicit regulatory requirement provides another reason why the government's reliance on Fountain was misplaced. SSA regulations explicitly mandated that the PRTF be completed, as the court in Fountain itself recognized.


20
Even more significantly, the court in Fountain held that the failure to fill out a PRTF was harmless because, although Fountain mentioned being depressed at the hearing, his application for benefits was based only on physical impairments. The court stated that "there is no credible evidence that Fountain suffers from a medically determinable mental impairment" and "Fountain did not include any allegation of a mental impairment in his original application." Id. at 532. The record here shows, and this court in Gutierrez I held, that Gutierrez presented credible evidence displaying a severe mental impairment and "her claim of severe depression was central to her application for disability benefits. " Gutierrez I, 199 F.3d at 1051.


21
Indeed, in Gutierrez I we distinguished Fountain on that basis, stating that "[o]ur decision is consistent with cases that have held that the failure to fill out the PRTF does not require reversal in situations where there is no viable claim of mental impairment." Id. (citing Fountain). We thus followed the holdings of at least three other circuits, including the Eighth, "recognizing that where there is a colorable claim of mental impairment, 20 C.F.R. §§ 404.1520a requires the evaluation form to be completed and appended to the decision, and the failure to do so requires remand to the Social Security Administration." Id. (citing Stambaugh v. Sullivan, 929 F.2d 292, 296 (7th Cir. 1991); Hill v. Sullivan, 924 F.2d 972, 975 (10th Cir. 1991) (per curiam); Montgomery v. Shalala , 30 F.3d 98, 100 (8th Cir. 1994)). Where the government tries to excuse an ALJ's failure to comply with an explicit regulation by resorting to a decision involving a different agency and different facts, particularly in the face of more relevant authority, it appears to be simply prolonging the litigation. Cf. Rawlings v. Heckler, 725 F.2d 1192, 1196-97 (9th Cir. 1984) (Burns, C.J., concurring in part and dissenting in part) (calling "attention to the problems created by the increasing time spent litigating attorney's fee issues" in Social Security cases because of "the intransigence of government lawyers").


22
Because we conclude that both the government's underlying conduct and its litigation position lacked a reasonable basis in fact and law, we hold that the government's position as a whole was not substantially justified. We turn, then, to the question of whether any special circumstances make the award of fees in this matter unjust.


23
B. Special circumstances.


24
Where the position of the government as a whole is not substantially justified, an award of attorney fees to the prevailing party is required unless "special circumstances make an award unjust." 28 U.S.C. §§ 2412(d)(1)(A). Ultimately, the government "urges that every case of first impression must constitute special circumstances" justifying a refusal to award costs under the EAJA. We disagree.


25
First, the government raises this issue under the wrong stage of analysis. Whether a litigated issue is one of first impression is properly considered as one factor in determining whether the government's litigation position is substantially justified, not as a special circumstance justifying the refusal of an award of fees. See Kali, 854 F.2d at 332 n.2 ("The [district] court's observation that the Ninth Circuit had not yet addressed the issue was an appropriate component of the inquiry into substantial justification.").


26
More importantly, there is no per se rule that EAJA fees cannot be awarded where the government's litigation position contains an issue of first impression. In several cases, we have held that the government's litigation position was substantially justified when the rules under which it was operating were ambiguous and it pursued a reasonable interpretation on which we had not previously ruled. See TKB Int'l, Inc. v. United States, 995 F.2d 1460, 1461, 1468 (9th Cir. 1993) (holding that the government was substantially justified in litigating an "interesting question of whether a federal tax lien . . . is valid . . . as against a subsequent purchaser" about which there were dueling "supportable interpretations of federal tax statutes and case law" over a "close question of law"); Stebco, Inc. v. United States, 939 F.2d 686, 687-88 (9th Cir. 1990) (denying fees for litigation over whether 26 U.S.C. §§ 7429 provided for appellate review, an issue of first impression), modified and superseded by 939 F.2d 686 (9th Cir. 1990);3 Rawlings, 725 F.2d at 1196 (holding government's appeal reasonable where proper definition of terms in EAJA were unsettled); see also Cornella v. Schweiker, 741 F.2d 170, 172 (8th Cir. 1984) (holding government reasonable in defending a district court judgment where "all of the purely legal issues were questions of first impression"). We have never held that the government is automatically shielded from a fee award because its argument involves any issue on which this court has not ruled.


27
The matter of first impression before this court in Gutierrez I did not involve contested interpretations of an ambiguous legal rule. The only issue of first impression we were required to resolve was the impact of a failure to follow a clear rule contained in the SSA's regulations. Thus the government's argument means that whenever it violates its own regulations, or assumably any clear legal rule, for the first time, the private party who succeeds in forcing government compliance nonetheless must be deprived of fees because the government gets an automatic "first impression " free pass. This position contravenes the purpose of the EAJA, a"clearly stated objective of [which] is to eliminate financial disincentives for those who would defend against unjustified governmental action and thereby to deter the unreasonable exercise of Government authority." Ardestani v. INS , 502 U.S. 129, 138 (1991).

CONCLUSION

28
The district court abused its discretion in finding that the government's position, on the whole, was substantially justified. We reverse and remand for an award of attorney fees.


29
REVERSED and REMANDED.



Notes:


*
 Jo Anne Barnhart is substituted for her predecessors, Shirley S. Chatter and Kenneth S. Apfel, as Commissioner of the Social Security Administration. Fed. R. App. P. 43(c)(2).


**
 The Honorable Henry A. Politz, Senior Circuit Judge, United States Court of Appeals for the Fifth Circuit, sitting by designation.


1
 The Social Security Act defines"disability" as the "inability to engage in any substantial gainful activity by reason of any medically determinable physical or mental impairment which . . . has lasted or can be expected to last for a continuous period of not less than 12 months." 42 U.S.C. §§ 423(d)(1)(A).


2
 We held that the failure to fill out the PRTF was not harmless because her treating psychiatrist "does not express any opinion that the claimant's position will materially improve within twelve months" and the opinion of the nonexamining physician was "not entitled to as much weight as the opinion of a treating physician." Id. at 1050.


3
 In both Stebco and TKB, fees were being requested for tax litigation under 26 U.S.C. §§ 7430. That statute authorizes "reasonable litigation costs" unless the government can establish "the position of the United States in the proceeding was substantially justified." Id. §§ 7430(c)(4)(B)(i) (emphasis added). Even if there were a per se rule in that context that litigation involving any issue of first impression was substantially justified, it could not be applied uniformly to the EAJA context where the court must also examine the reasonableness of the underlying government conduct.


