The panel unanimously concludes this case is suitable for decision *

without oral argument. See Fed. R. App. P. 34(a)(2).

 The Honorable James P. Jones, United States District Judge for the **

Western District of Virginia, sitting by designation.

FOR PUBLICATION

UNITED STATES COURT OF APPEALS

FOR THE NINTH CIRCUIT

JEFFREY MEIER,

Plaintiff-Appellant,

v.

CAROLYN W. COLVIN,

Commissioner of Social Security,

Defendant-Appellee.

No. 11-35736

D.C. No.

4:09-cv-00031-

SEH

OPINION

Appeal from the United States District Court

for the District of Montana

Sam E. Haddon, District Judge, Presiding

Submitted August 10, 2012*

Filed July 23, 2013

Before: William A. Fletcher and Raymond C. Fisher,

Circuit Judges, and James P. Jones, District Judge.**

Opinion by Judge Fisher
2 MEIER V. COLVIN

 This summary constitutes no part of the opinion of the court. It has

***

been prepared by court staff for the convenience of the reader.

SUMMARY

***

Equal Access to Justice Act / Attorneys’ Fees

The panel reversed the district court’s order denying a

plaintiff’s motion for attorneys’ fees and costs under the

Equal Access to Justice Act, and it remanded for an award of

fees and costs.

The panel held that the position of the United States was

not substantially justified in this case concerning the

plaintiff’s application for social security disability benefits.

The panel stated that the “position of the United States”

includes both the government’s litigation position and the

underlying agency action giving rise to the civil action. The

panel held that in the social security context, the court treats

the decision of the administrative law judge as the underlying

agency action.

COUNSEL

John E. Seidlitz, Jr., Seidlitz Law Office, Great Falls,

Montana, for Plaintiff-Appellant.

Michael C. Cotter, United States Attorney, George F.

Darragh, Jr., Assistant United States Attorney, Great Falls,

Montana; Dorrelyn K. Dietrich, Special Assistant United

States Attorney, Social Security Administration, Office of the

General Counsel, Denver, Colorado; John Jay Lee, Regional
MEIER V. COLVIN 3

Chief Counsel, Region VIII, Social Security Administration,

Office of the General Counsel, Denver, Colorado, for

Defendant-Appellee.

OPINION

FISHER, Circuit Judge:

Jeffrey Meier appeals the district court’s order denying

his motion for attorney’s fees and costs under the Equal

Access to Justice Act. We hold that the position of the

United States was not substantially justified. We therefore

reverse and remand for an award of fees and costs.

BACKGROUND

Meier applied for social security disability benefits. The

administrative law judge (ALJ) denied benefits and the

district court affirmed. We reversed and remanded for an

award of benefits in an unpublished memorandum

disposition, holding that the ALJ (1) failed to offer specific

and legitimate reasons, supported by substantial evidence, for

rejecting treating physician Dr. Mel Margaris’ opinion that

Meier was incapable of working, and (2) failed to offer clear

and convincing reasons, supported by substantial evidence,

for discounting Meier’s subjective pain testimony. See Meier

v. Astrue, 404 F. App’x 150 (9th Cir. 2010).

Meier moved for an award of $14,856.55 in attorney’s

fees and $805 in costs under the Equal Access to Justice Act

(EAJA), 28 U.S.C. § 2412(d). The district court denied the

motion, offering only this brief explanation for the denial of

fees:
4 MEIER V. COLVIN

No less than 6 separate rulings were issued

denying benefits before the Ninth Circuit

Court of Appeals ordered benefits be paid.

The position of the government in opposing

the petition for benefits was substantially

justified.

On appeal, Meier argues that the district court abused its

discretion by denying EAJA fees. We agree.

STANDARD OF REVIEW

We review the district court’s denial of attorney’s fees

under EAJA for an abuse of discretion. See Sampson v.

Chater, 103 F.3d 918, 921 (9th Cir. 1996). A district court

abuses its discretion when it fails to apply the correct legal

rule or its application of the correct legal rule is illogical,

implausible or without support in inferences that may be

drawn from the facts in the record. See United States v.

Hinkson, 585 F.3d 1247, 1261–62 (9th Cir. 2009) (en banc).

DISCUSSION

I.

EAJA provides that “a court shall award to a prevailing

party other than the United States fees and other expenses . . .

incurred by that party in any civil action . . . unless the court

finds that the position of the United States was substantially

justified or that special circumstances make an award unjust.”
MEIER V. COLVIN 5

 In full, § 2412(d)(1)(A) provides: 1

Except as otherwise specifically provided by statute, a

court shall award to a prevailing party other than the

United States fees and other expenses, in addition to

any costs awarded pursuant to subsection (a), incurred

by that party in any civil action (other than cases

sounding in tort), including proceedings for judicial

review of agency action, brought by or against the

United States in any court having jurisdiction of that

action, 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).

28 U.S.C. § 2412(d)(1)(A). It is the government’s burden to 1

show that its position was substantially justified. See

Gutierrez v. Barnhart, 274 F.3d 1255, 1258 (9th Cir. 2001).

Substantial justification means “justified in substance or in

the main – that is, justified to a degree that could satisfy a

reasonable person.” Pierce v. Underwood, 487 U.S. 552, 565

(1988) (internal quotation marks omitted). Put differently,

the government’s position must have a “reasonable basis both

in law and fact.” Id.

The “position of the United States” includes both the

government’s litigation position and the underlying agency

action giving rise to the civil action. See, e.g., Hardisty v.

Astrue, 592 F.3d 1072, 1077 (9th Cir. 2010); Al-Harbi v. INS,

284 F.3d 1080, 1084 (9th Cir. 2002) (order); Kali v. Bowen,

854 F.2d 329, 332 (9th Cir. 1988). As EAJA provides,

“‘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
6 MEIER V. COLVIN

action is based.” 28 U.S.C. § 2412(d)(2)(D) (emphasis

added).

In the social security context, we have consistently treated

the ALJ’s decision as the “action or failure to act by the

agency upon which the civil action is based,” but we have

never explained why this is the case. See, e.g., Hardisty,

592 F.3d at 1077; Gutierrez, 274 F.3d at 1259. In this

opinion, we explain the rationale for our longstanding

practice.

Treating the ALJ’s decision as the underlying agency

action may, at first glance, seem unwarranted. In determining

whether fees should be awarded, we would most naturally

begin by focusing on the behavior of the government when it

acted as a litigator and when it acted as a party whose action

or inaction is challenged in the suit. It is less obvious that we

should evaluate (and disapprove by the award of fees) the

behavior of the government when it acted as an adjudicator.

That view does not bear scrutiny, however. First,

disregarding the government’s conduct as adjudicator runs

counter to the EAJA’s plain language. In the typical social

security case, the civil complaint alleges procedural and

substantive errors by the ALJ. The ALJ’s decision, therefore,

is directly and literally “the action or failure to act by the

agency upon which the civil action is based.” 28 U.S.C.

§ 2412(d)(2)(D). EAJA’s plain language thus directs courts

to focus on the ALJ’s decision.

Second, in the typical case the ALJ’s decision represents

not only the government’s position as adjudicator but also its

position as a party. When an ALJ denies an application for

social security benefits, the claimant has the option of
MEIER V. COLVIN 7

appealing that decision to the Appeals Council. See 20

C.F.R. § 404.967. If the Appeals Council denies review, the

ALJ’s decision becomes the final decision of the

Commissioner of Social Security. See 20 C.F.R. § 404.981;

Shafer v. Astrue, 518 F.3d 1067, 1068-69 (9th Cir. 2008)

(“The Social Security Administration’s Appeals Council

denied Shafer’s request for review of the ALJ’s decision,

leaving the ALJ’s decision to stand as the final decision of the

Commissioner.”); cf. Taylor v. Heckler, 835 F.2d 1037, 1043

n.14 (3d Cir. 1987) (“In this case, the Secretary adopted in

total, and defended in the district court, the ALJ’s evaluation

of Taylor’s disability claim. The ALJ’s determination that

Taylor was not disabled thus became the government’s

underlying position, one of the two positions of the United

States that must be substantially justified if this appeal is to

fall within EAJA’s exception.”). That is precisely what

occurred in this case: the Appeals Council denied Meier’s

request for review, making “the Administrative Law Judge’s

decision . . . the final decision of the Commissioner of Social

Security in [Meier’s] case.” Notice of Appeals Council

Action. Thus, even if it were inappropriate to consider the

government’s position as adjudicator, we would still review

the ALJ’s decision because it constitutes not only an

adjudication but also the Commissioner’s final decision

denying benefits.

Finally, even if the ALJ’s decision represented only an

adjudication and not also the position of the Commissioner,

it would still be proper to consider it. EAJA refers to the

government’s “position” and to the “action or failure to act by

the agency,” making no distinction between an agency’s

adjudicative and adversarial acts. 28 U.S.C. § 2412(d)(1)(A),

(d)(2)(D). The statute thus covers both types of government

conduct, as we previously made clear in the analogous
8 MEIER V. COLVIN

immigration context in Thangaraja v. Gonzales, 428 F.3d

870, 873–74 (9th Cir. 2005).

In Thangaraja, the government argued that decisions by

the Board of Immigration Appeals (BIA) and immigration

judge (IJ) were irrelevant to the EAJA analysis and that the

only position that mattered was the Department of Homeland

Security’s (DHS) defense of the BIA’s and IJ’s decisions

before this court. See id. at 873. We rejected that argument,

holding that “the ‘position of the United States’ as defined by

EAJA encompasses both the DHS’s litigation position and the

underlying agency decision rendered by the BIA or an IJ.”

Id. at 874. We said:

Pursuant to EAJA, the BIA and IJ decisions

we review are as much the “position of the

United States” as is the DHS’s litigation

position. The IJ’s decision in this case,

summarily affirmed without opinion by the

BIA, is “the action . . . by the agency upon

which the civil action is based,” which the

statute requires us to consider in determining

whether the “position of the United States”

was substantially justified.

Moreover, the DHS’s analogy to judicial

proceedings is misplaced. Both the Executive

Office for Immigration Review (EOIR), to

which the BIA and the Immigration Court

belong, and the DHS are part of the executive

branch of the United States government,

despite their mutual independence.
MEIER V. COLVIN 9

Id. at 873–74 (alteration in original) (citations omitted).

Thus, even if the ALJ’s decision were purely adjudicative, it

would nonetheless qualify as the position of the United States

for purposes of EAJA’s substantial justification inquiry.

For each of these reasons, we properly look to decisions

of the ALJ to determine whether the government’s position

in the underlying agency action was substantially justified.

II.

Applying the substantial justification test here, we first

consider the underlying agency action, which, for the reasons

we have just explained, is the decision of the ALJ. We then

consider the government’s litigation position.

A. Underlying Agency Conduct

In our memorandum disposition, we held that the ALJ’s

decision was not supported by substantial evidence. See

Meier, 404 F. App’x at 151–52. Specifically, the ALJ failed

to offer specific and legitimate reasons, supported by

substantial evidence, for rejecting Dr. Margaris’ opinion that

Meier was incapable of working. See Lester v. Chater,

81 F.3d 821, 830 (9th Cir. 1995). We further held that the

ALJ failed to offer clear and convincing reasons, supported

by substantial evidence, for discounting Meier’s subjective

pain testimony. See Carmickle v. Comm’r Soc. Sec. Admin.,

533 F.3d 1155, 1160 (9th Cir. 2008). We accordingly

remanded for an award of benefits. In reaching these

conclusions, we applied the deferential substantial evidence

standard of review. Under this standard, “‘[s]ubstantial

evidence’ means . . . such relevant evidence as a reasonable

person might accept as adequate to support a conclusion.”
10 MEIER V. COLVIN

Lingenfelter v. Astrue, 504 F.3d 1028, 1035 (9th Cir. 2007).

Given the significant similarity between this standard and the

substantial justification standard – “justified to a degree that

could satisfy a reasonable person,” Pierce, 487 U.S. at 565 –

this court and other circuits have held that a “holding that the

agency’s decision . . . was unsupported by substantial

evidence is . . . a strong indication that the ‘position of the

United States’ . . . was not substantially justified.”

Thangaraja, 428 F.3d at 874; see also id. (“[I]t will be only

a ‘decidedly unusual case in which there is substantial

justification under the EAJA even though the agency’s

decision was reversed as lacking in reasonable, substantial

and probative evidence in the record.’” (quoting Al-Harbi,

284 F.3d at 1085)); Hadden v. Bowen, 851 F.2d 1266, 1269

(10th Cir. 1988) (holding that “a lack of substantial evidence

indicates, but does not conclusively establish, that the

government’s position concerning a claim was not

substantially justified”). For this reason, and for the reasons

stated in our memorandum disposition on the merits, we hold

that the government’s underlying action was not substantially

justified in this case.

B. Litigation Position

Because the government’s underlying position was not

substantially justified, we need not address whether the

government’s litigation position was justified. See Shafer,

518 F.3d at 1071 (“The government’s position must be

substantially justified at each stage of the proceedings.”

(quoting Corbin v. Apfel, 149 F.3d 1051, 1052 (9th Cir.

1998)) (internal quotation marks omitted)); Li v. Keisler,

505 F.3d 913, 918 (9th Cir. 2007) (order) (“[T]he government

must show that all of these positions were substantially

justified in order to avoid an award of EAJA fees.”); cf.
MEIER V. COLVIN 11

Commissioner, INS v. Jean, 496 U.S. 154, 159 n.7 (1990)

(“[T]he amendment will make clear that the Congressional

intent is to provide for attorney fees when an unjustifiable

agency action forces litigation, and the agency then tries to

avoid such liability by reasonable behavior during the

litigation[.]” (first alteration in original) (quoting H.R. Rep.

No. 98-992, pp. 9, 13 (1984))). Even if we were to reach the

issue, we would conclude that the government’s litigation

position – defending the ALJ’s errors on appeal – lacked the

requisite justification. See Sampson, 103 F.3d at 922 (“It is

difficult to imagine any circumstance in which the

government’s decision to defend its actions in court would be

substantially justified, but the underlying administrative

decision would not.” (quoting Flores v. Shalala, 49 F.3d 562,

570 n.11 (9th Cir. 1995)) (internal quotation marks omitted).

Although the government proffers a lengthy defense of the

ALJ’s decision, it largely reiterates arguments that we

rejected in the previous appeal. Given the serious flaws in the

ALJ’s analysis, we are not persuaded that the government

reasonably chose to defend the ALJ’s decision in this action.

The district court concluded that the government’s

position was substantially justified because the government

prevailed at the administrative and district court levels before

losing in this court. Although it was proper for the district

court to consider the government’s success in the district

court as part of the EAJA analysis, see Lewis v. Barnhart,

281 F.3d 1081, 1084 (9th Cir. 2002), the court erred by

considering the government’s success at the administrative

level. The ALJ’s decision was not supported by substantial

evidence. That the ALJ agreed with the government,

therefore, does not support the conclusion that the

government’s position was substantially justified.
12 MEIER V. COLVIN

CONCLUSION

The order of the district court denying Meier’s motion for

attorney’s fees and costs under EAJA is reversed. The case

is remanded for an award of fees and costs.

REVERSED AND REMANDED.