                    FOR PUBLICATION
  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT

PACIFIC FISHERIES INC.,                   
               Petitioner-Appellant,             No. 04-35897
                 v.                               D.C. No.
UNITED STATES OF AMERICA,                      CV-04-01147-MJP
              Respondent-Appellee.
                                          

KONSTANTIN VLADIMIROVICH                  
VOLOSHENKO,                                      No. 04-35899
             Petitioner-Appellant,
               v.                                 D.C. No.
                                               CV-04-01149-MJP
UNITED STATES OF AMERICA,                         OPINION
            Respondent-Appellee.
                                          
        Appeal from the United States District Court
          for the Western District of Washington
        Marsha J. Pechman, District Judge, Presiding

                  Argued and Submitted
           December 5, 2006—Seattle, Washington

                       Filed April 17, 2007

   Before: Betty B. Fletcher and M. Margaret McKeown,
 Circuit Judges, and William W Schwarzer,* District Judge.

                  Opinion by Judge McKeown

  *The Honorable William W Schwarzer, Senior United States District
Judge for the Northern District of California, sitting by designation.

                                4361
4364        PACIFIC FISHERIES INC. v. UNITED STATES


                         COUNSEL

Robert J. Chicoine and Cori Flanders-Palmer, Chicoine &
Hallett, P.S., Seattle, Washington, for appellants Pacific Fish-
eries and Konstantin Vladimirovich Voloshenko.

Gretchen Wolfinger, Eileen J. O’Connor, and Jonathan
Cohen, Department of Justice, Washington, DC, and John
McKay, United States Attorney, Seattle, Washington, for
appellee United States.


                          OPINION

McKEOWN, Circuit Judge:

   The Internal Revenue Code allows taxpayers to recover
costs and attorneys’ fees if they prevail in either civil or
administrative proceedings, so long as the position of the
United States was not substantially justified. 26 U.S.C.
§ 7430. Appellants Pacific Fisheries and Konstantin
Vladimirovich Voloshenko (collectively the “taxpayers”) seek
attorneys’ fees associated with pursuing two federal court
petitions to quash third-party summonses. The taxpayers and
the United States agree that the summonses were not enforce-
            PACIFIC FISHERIES INC. v. UNITED STATES        4365
able. They disagree about whether the government should pay
the taxpayers’ legal fees as a consequence. The government’s
issuance of the summonses essentially forced the taxpayers
into court, but once there, the government’s only action dur-
ing the litigation was to promptly withdraw the summonses.
The question is whether the government’s prelitigation con-
duct should be factored into a determination of whether its
position in the judicial proceeding “was substantially justi-
fied” as defined in the statute. 26 U.S.C. § 7430(c)(4)(B)(i).
Looking to the language and structure of the statute, we con-
clude that the litigation fees of these particular taxpayers do
not fall within the coverage of the statute governing fees in a
“court proceeding.” See 26 U.S.C. § 7430(a)(2).

                         BACKGROUND

   On April 23, 2004, the Internal Revenue Service (“IRS”)
served two administrative third-party summonses on Bank of
America. The first summons requested information for the
years 1995 to 2000 on an account held by Pacific Fisheries.
The second summons requested the same information for two
accounts held by Konstantin Voloshenko, an employee of
Pacific Fisheries.

   Both summonses were issued pursuant to a request by the
Russian government under a tax treaty between the United
States and the Russian Federation. See Convention Between
the United States of America and the Russian Federation for
the Avoidance of Double Taxation and the Prevention of Fis-
cal Evasion with Respect to Taxes on Income and Capital, art.
25, U.S.-Russ., June 17, 1992, S. Treaty Doc. No. 102-39
(1993), 1992 WL 608527, available at http://www.irs.gov/
pub/irs-trty/russia.pdf. The Russian government requested
these records as part of its tax investigation of Voloshenko.

  The IRS claims that it attempted to serve summons notices
on the taxpayers, but the parties dispute whether either Pacific
Fisheries or Voloshenko was properly served. In any event,
4366         PACIFIC FISHERIES INC. v. UNITED STATES
the taxpayers only received actual notice of the summonses
on May 10, 2004, a mere three days before the statutory dead-
line to file petitions to quash their enforcement.

   Immediately after discovering that the summonses had
been issued, the taxpayers called IRS Revenue Agent Douglas
Sanderson to dispute the enforceability of the summonses on
statute of limitations grounds. Sanderson replied that he
believed the summonses were enforceable. Three days later,
on May 13, 2004, the taxpayers filed two separate petitions to
quash the summonses in the United States District Court for
the Western District of Washington. The principal reason they
advanced for quashing the summonses was that the time
period covered by the summonses (1995-2000) was beyond
the statute of limitations on any tax liability incurred by the
taxpayers. See 26 U.S.C. § 6501(a) (providing for a three-year
statute of limitations in most civil enforcement cases under
the Internal Revenue Code); 26 U.S.C. § 6531 (providing for
a three-year statute of limitations in most criminal cases under
the Internal Revenue Code).

   On June 23, 2004, the taxpayers sent a letter to the IRS reit-
erating their position that the summonses were unenforceable.
The letter also requested specific documents relating to the
underlying investigation.

   On June 25, 2004, the IRS sent a notice to Bank of Amer-
ica, with a copy to taxpayers’ counsel, that it was withdrawing
the summonses. Four days later, IRS counsel wrote to taxpay-
ers’ counsel informing him that the summonses had been
withdrawn. The IRS requested the taxpayers to voluntarily
dismiss the petition under Federal Rule of Civil Procedure 41
“[b]ecause the controversy at issue in both matters is now
moot and the United States has not made an appearance in
either matter.”

   The taxpayers refused to file voluntary dismissals but
offered to stipulate to dismissal so long as the IRS provided
              PACIFIC FISHERIES INC. v. UNITED STATES             4367
certain information and assurances. The government then
moved to dismiss the petitions to quash, arguing that the peti-
tions were moot since the IRS had withdrawn the summonses.
See Spencer v. Kemna, 523 U.S. 1, 7 (1998) (holding that the
jurisdiction of the federal courts is limited to those actions
that provide a live case or controversy); Dame v. United
States, 643 F. Supp. 533, 534 (S.D.N.Y. 1986) (holding that
a petition to quash is moot when a summons has been with-
drawn). Shortly thereafter, Pacific Fisheries served a set of
interrogatories and a request for production of documents on
the government. The taxpayers filed a joint response to the
motions to dismiss. They did not oppose the motions to dis-
miss per se; rather, they requested dismissal of the petitions
subject to certain conditions. Specifically, they wanted assur-
ances that the IRS would not reissue the summons, requested
administrative costs and attorneys’ fees, and requested that
the court order the government to respond to the discovery
requests.1

   In substantially identical orders, the district court granted
the government’s motions to dismiss in both cases, holding
that taxpayers’ petitions to quash became moot when the IRS
withdrew the summonses. The district court declined to
impose conditions on the dismissal or to award attorneys’
fees. In declining to award attorneys’ fees, the court held that
the taxpayers had not convinced the court that they were pre-
vailing parties for the purposes of the fee-shifting statute, 26
U.S.C. § 7430, and that the taxpayers had not established that
the United States’ position was not substantially justified.

                              ANALYSIS

   The taxpayers decry what they view as abusive tactics by
the IRS and contend that the district court erred in declining
  1
   Although the taxpayers requested administrative costs in the district
court, they have not pursued that argument on appeal.
4368              PACIFIC FISHERIES INC. v. UNITED STATES
to award them attorneys’ fees under 26 U.S.C. § 7430.2
Although we are not unsympathetic to the taxpayers’ claimed
plight, we affirm the district court’s order.

I.       STATUTORY FRAMEWORK

     The fee-shifting statute provides that:

         (a) In general.—In any administrative or court pro-
         ceeding which is brought by or against the United
         States in connection with the determination, collec-
         tion, or refund of any tax, interest, or penalty under
         this title, the prevailing party may be awarded a
         judgment or a settlement for—

         (1) reasonable administrative costs incurred in con-
         nection with such administrative proceeding within
         the Internal Revenue Service, and

         (2) reasonable litigation costs incurred in connec-
         tion with such court proceeding.

26 U.S.C. § 7430. Section 7430 defines several of the above
terms, including the following:

         (4)   Prevailing party.—

               (A) In general.—The term “prevailing
               party” means any party in any proceeding
               to which subsection (a) applies (other than
               the United States or any creditor of the tax-
               payer involved)—

                 (i)   which—
     2
   We review the denial of attorneys’ fees under 26 U.S.C. § 7430 for an
abuse of discretion. United States v. Ayres, 166 F.3d 991, 997 (9th Cir.
1999).
            PACIFIC FISHERIES INC. v. UNITED STATES        4369
              (I) has substantially prevailed with
              respect to the amount in controversy,
              or

              (II) has substantially prevailed with
              respect to the most significant issue or
              set of issues presented . . .

         (B) Exception if United States establishes
         that its position was substantially justified.
         —

           (i) General rule.—A party shall not be
           treated as the prevailing party in a pro-
           ceeding to which subsection (a) applies if
           the United States establishes that the
           position of the United States in the pro-
           ceeding was substantially justified . . . .

    (7) Position of United States.—The term “position
    of the United States” means—

         (A) the position taken by the United
         States in a judicial proceeding to which
         subsection (a) applies, and

         (B) the position taken in an administrative
         proceeding to which subsection (a) applies
         ....

Id. § 7430(c)(4); § 7430(c)(7).

   [1] To prevail on a claim for attorneys’ fees, a taxpayer
must demonstrate that he has substantially prevailed with
respect to the amount in controversy or the most significant
issue or set of issues presented. Id. § 7430(c)(4). A taxpayer
is then entitled to attorneys’ fees unless the United States can
demonstrate that its position was substantially justified. Id.
4370         PACIFIC FISHERIES INC. v. UNITED STATES
II.    THE TAXPAYERS SUBSTANTIALLY PREVAILED WITH
       RESPECT TO THE MOST SIGNIFICANT ISSUE PRESENTED

   [2] As a preliminary matter, we note that the government
does not dispute that the taxpayers prevailed with respect to
the most significant issue in the proceedings below. The tax-
payers filed two petitions to quash IRS summonses in district
court. Although the government’s motions to dismiss were
granted, the taxpayers prevailed on the most significant issue
because they received the relief they sought all along — the
IRS withdrew the summonses. Cf. Donlon I Dev. Corp. v.
United States, 830 F. Supp. 1315, 1317 n.1 (C.D. Cal. 1993)
(noting that when the IRS withdrew a summons before mov-
ing to dismiss a petition to quash, the government conceded
that the petitioner prevailed with respect to the most signifi-
cant issue).

III.   THE UNITED STATES’ POSITION WAS SUBSTANTIALLY
       JUSTIFIED

   [3] The taxpayers’ central contention on appeal is that the
district court erred when it placed the burden of demonstrat-
ing that the United States’ position was not substantially justi-
fied on them. They further contend that had the district court
not committed this error, the taxpayers would be entitled to
attorneys’ fees under the fee-shifting statute. We agree that
the district court erred in placing the burden to prove lack of
substantial justification on the taxpayers, but we hold that as
a matter of law, the government met its burden to prove its
position was substantially justified.

  A.    BURDEN OF PROOF

   [4] The fee-shifting statute provides that a party may not be
treated as the prevailing party if “the United States establishes
that the position of the United States in the proceeding was
substantially justified.” 26 U.S.C. § 7430(b)(4)(B)(i) (empha-
sis added). The language of the statute places the burden
             PACIFIC FISHERIES INC. v. UNITED STATES        4371
squarely on the United States, not on the taxpayer, to demon-
strate that the government’s position was substantially justi-
fied. Id.; see also Kenney v. United States, 458 F.3d 1025,
1032 (9th Cir. 2006) (allocating the burden to prove that the
government’s position was substantially justified to the gov-
ernment). The statute was amended in 1996, in part to specifi-
cally shift the burden of proving substantial justification from
the taxpayer to the IRS. Compare 26 U.S.C. § 7430(c)(4)(A)
(1996) (“The term ‘prevailing party’ means any party in any
proceeding to which subsection (a) applies (other than the
United States or any creditor of the taxpayer involved)—(i)
which establishes that the position of the United States in the
proceeding was not substantially justified . . . .”) with 26
U.S.C. § 7430(c)(4)(B)(i) (2006) (stating that a party may not
be treated as the prevailing party if “the United States estab-
lishes that the position of the United States in the proceeding
was substantially justified.”); see also H.R. Rep. 104-506, at
22, 36 (1996) (explaining that the bill’s drafters believed it
appropriate for the IRS to demonstrate that it was substan-
tially justified in maintaining its position when the taxpayer
prevails). Thus, the district court inverted the statutory burden
when it held that the taxpayers “ha[d] not convinced the
Court that the [government’s] position . . . was not substan-
tially justified.”

  B.   POSITION OF THE UNITED STATES

   [5] We next consider whether the United States demon-
strated that its position was substantially justified. The posi-
tion of the United States is substantially justified if it is
“justified to a degree that satisfies a reasonable person.”
Pierce v. Underwood, 487 U.S. 552, 565 (1988). That is, it
must have a reasonable basis in both law and fact. Id. at 565.
The taxpayers argue that the United States acted unreasonably
when it failed to withdraw the summons before the taxpayers
filed the petitions in federal court. Although we acknowledge
that there is a serious question whether this prelitigation con-
duct was arguably unreasonable, the applicable statutory sub-
4372         PACIFIC FISHERIES INC. v. UNITED STATES
section pertains to “a judicial proceeding,” not to the
government’s      prelitigation    conduct.   26    U.S.C.
§ 7430(c)(7)(A) (“position of the United States” means the
position taken “in a judicial proceeding”).

    1.   STATUTORY HISTORY

   The plain language of the statute distinguishes administra-
tive from judicial proceedings and does not provide a bridge
for conduct or events that span those proceedings. The statu-
tory evolution of the fees provision underscores this conclu-
sion.

   From 1986 to 1988, § 7430 defined the “position of the
United States” as “the position taken by the United States in
the civil proceeding, and . . . any administrative action or
inaction by the District Counsel of the Internal Revenue Ser-
vice (and all subsequent administrative action or inaction)
upon which such proceeding is based.” See Pub. L. 99-514
§ 1551(a), 100 Stat. 2085 (1986) (enacting this definition). If
the current version of § 7430 included this language, we
would have no problem adopting the taxpayers’ position.
Unfortunately for the taxpayers, the statute has been amended
and later amendments did not merge civil proceedings and
“administrative actions,” nor did later amendments permit
benchmarking of the IRS’s conduct against “administrative
action or inaction [ ] upon which such [civil] proceeding is
based.” Id.

   In 1988, the statute was amended, and the amended version
of § 7430 separated administrative and litigation costs. It read:

    In any administrative or court proceeding which is
    brought by or against the United States in connection
    with the determination, collection, or refund of any
    tax, interest, or penalty under this title, the prevailing
    party may be awarded a judgment or a settlement for
    —
            PACIFIC FISHERIES INC. v. UNITED STATES          4373
    (1) reasonable administrative costs incurred in con-
    nection with such administrative proceeding within
    the Internal Revenue Service, and

    (2) reasonable litigation costs incurred in connection
    with such court proceeding.

Pub. L. No. 100-647 § 6239(a), 102 Stat. 3342 (1988). The
statute defined a prevailing party as:

    any party in any proceeding to which subsection (a)
    applies (other than the United States or any creditor
    of the taxpayer involved) — (i) which establishes
    that the position of the United States in the proceed-
    ing was not substantially justified, and (ii) which —
    (I) has substantially prevailed with respect to the
    amount in controversy, or (II) has substantially pre-
    vailed with respect to the most significant issue or
    set of issues presented . . . .”

Id. The statute also distinguished between judicial and admin-
istrative proceedings. The term “position of the United States”
meant “(A) the position taken by the United States in a judi-
cial proceeding to which subsection (a) applies, and (B) the
position taken in an administrative proceeding to which sub-
section (a) applies.” Id.

   We interpreted the 1988 version of the statute in Huffman
v. Commissioner of Internal Revenue, 978 F.2d 1139 (9th Cir.
1992). We acknowledged that “divergent judicial opinions
exist to whether the phrase ‘position of the United States’
refer[s] to the government’s position both in prelitigation
administrative proceedings and after commencement of litiga-
tion.” Id. at 1144. We held that because the provision defining
“position of the United States” refers to an “administrative
proceeding” as distinct from a “judicial proceeding,” “it fol-
lows that the prevailing party in both administrative proceed-
ings and judicial proceedings who seeks administrative and
4374          PACIFIC FISHERIES INC. v. UNITED STATES
litigation costs must separately establish that the United
States’ position in each of the proceedings was not substan-
tially justified.” Id. at 1146. We continued, “[t]hus the posi-
tion taken in the administrative proceeding does not
automatically apply to the judicial proceeding. . . . According
to the plain language of § 7430 and under normal rules of stat-
utory construction, a bifurcated analysis of ‘substantially jus-
tified’ should be made in each proceeding.” Id.

   Huffman drew additional support from the statute’s defini-
tion of “position of the United States.” Under the 1988 ver-
sion of the statute, “position of the United States” meant “the
position taken by the United States in a judicial proceeding to
which subsection (a) applies, and the position taken in an
administrative proceeding to which subsection (a) applies.”
Pub. L. No. 100-647 at § 6239(a). Huffman held that this
meant the United States could have different positions in
administrative and judicial proceedings. See Huffman, 978
F.2d at 1146; Pub. L. No. 100-647 § 6239(a), 102 Stat. 3342
(1988) (enacting the provision containing this definition).

   The 1996 amendments were significant in shifting the bur-
den of proving substantial justification from the taxpayer to
the government. See Pub. L. No. 104-168 § 701, 110 Stat.
1452 (1996).3 The current statute now states that “a party shall
not be treated as the prevailing party in a proceeding to which
subsection (a) applies if the United States establishes that the
position of the United States in the proceeding was substan-
tially justified.” See id.; see also 26 U.S.C. § 7430(c)(4)(B)(i)
(2006). However, the 1996 amendments did not change the
dividing line between administrative and judicial proceedings:
the statute retains the language defining the position of the
United States as “(A) the position taken by the United States
in a judicial proceeding to which subsection (a) applies, and
(B) the position taken in an administrative proceeding to
  3
   Although the statute has been amended at other times in other respects,
none of those changes is relevant to our discussion here.
             PACIFIC FISHERIES INC. v. UNITED STATES          4375
which subsection (a) applies . . . .” See 26 U.S.C.
§ 7430(c)(7).

   Because the statutory language continues to treat adminis-
trative proceedings separately from judicial proceedings, Huf-
fman’s bifurcated inquiry applies with equal force to the
present statute. Cf. Kenney v. United States, 458 F.3d 1025,
1032-33 (9th Cir. 2006) (applying Huffman’s bifurcated
inquiry in a case under the new version of the statute). We
disagree with the taxpayers’ argument that the 1996 amend-
ments somehow render Huffman’s reasoning inapplicable.

   Finally, we note that in another administrative law context,
the Equal Access to Justice Act (“EAJA”) provides for attor-
neys’ fees awards when a government agency takes a position
either before or during litigation that is not substantially justi-
fied. 28 U.S.C. § 2412. See, e.g., Thangaraja v. Gonzales, 428
F.3d 870, 873-74 (9th Cir. 2005) (examining the Immigration
and Naturalization’s position in agency proceedings as well as
the immigration judge’s and Board of Immigration Appeals’
decisions in determining that attorneys’ fees were warranted
under the EAJA); Lewis v. Barnhart, 281 F.3d 1081, 1083-84
(9th Cir. 2002) (considering the finding of an administrative
law judge before civil litigation commenced in determining
whether the United States was substantially justified).

   The EAJA, first enacted in 1948, provides that “[u]nless
expressly prohibited by statute, a court may award reasonable
fees and expenses of attorneys . . . to the prevailing party in
any civil action brought by or against the United States or any
agency or any official of the United States acting in his or her
official capacity in any court having jurisdiction of such
action.” 28 U.S.C. § 2412(b). To recover, a party must dem-
onstrate that the position of the United States is not substan-
tially justified. Id. § 2412(d)(1)(A); § 2412(d)(1)(B).

  [6] In 1985, Congress added language to the EAJA clarify-
ing that “position of the United States” means “in addition to
4376           PACIFIC FISHERIES INC. v. UNITED STATES
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.” Pub. L. No. 99-80 § 2, 99 Stat. 183 (1985);
see also id. § 2412 (d)(2)(D). The EAJA also specifically
excludes from its coverage any action that might be brought
under 26 U.S.C. § 7430. 28 U.S.C. § 2412(e). Thus it is evi-
dent from the statutory language that Congress intended the
fee-shifting inquiry under the tax statute to be different from
the fee-shifting inquiry under the EAJA. The tax statute
includes no gap filler for including prelitigation agency action
as part of the government’s position in litigation.

     2.    APPLICATION        TO     DISTRICT       COURT        “JUDICIAL
           PROCEEDING”

   [7] With these principles in mind, we hold that the govern-
ment’s position in the “judicial proceeding” was substantially
justified. Huffman instructs us to look at a party’s conduct at
“each stage of the case” in determining whether an award of
attorneys’ fees is appropriate. 978 F.2d at 1148. Here, the tax-
payers filed the petitions to quash in district court and then,
one month later, the taxpayers sent a letter to the IRS asking
for more information and informing the IRS that they
believed the summonses were invalid. Two days later, the IRS
withdrew the summonses and requested that the taxpayers
voluntarily dismiss the petitions to quash. After the taxpayers
refused to dismiss the case, they launched a mini-litigation
surrounding their requested fees and conditions. The only
position taken by the government was withdrawal of the sum-
monses before its answer was due.4 The government’s with-
   4
     The government asks us to adopt a categorical rule that in considering
attorneys’ fees under 26 U.S.C. § 7430, the government does not take a
position until it files its answer. We decline to adopt that bright-line rule,
even though we hold that the government’s conduct in this case was rea-
sonable. Such a rule would make no sense as it would potentially exclude
conduct or positions taken in a judicial proceeding before the answer was
filed. See Huffman, 978 F.2d at 1148 (stating that “[g]enerally, the posi-
               PACIFIC FISHERIES INC. v. UNITED STATES                 4377
drawal of the summonses, which both parties agree were
unenforceable, was surely reasonable. The government also
acted reasonably when it asked the taxpayers to voluntarily
dismiss the petitions to quash, given that those petitions were
moot after the summonses were withdrawn. Accordingly, the
government established that its position in litigation was sub-
stantially justified and the taxpayers are not entitled to attor-
neys’ fees.

   [8] The taxpayers also argue that the district court should
have permitted them discovery to shore up their claim that the
IRS was unreasonable, to support their claim for conditions,
and to provide a basis for the district court to impose sanc-
tions. This endeavor is premised on the taxpayers’ view that
the IRS has engaged in improper conduct in this and at least
two other Russian tax treaty cases. As the district court
pointed out, it was unaware of any case under Rule 41(a)(2)
“in which plaintiffs were able to condition their own volun-
tary dismissal upon payment or performance by defendants.”
The district court did not abuse its discretion in denying the
taxpayers’ requests, since the purpose of discovery is to aid
a party in the preparation of its case, not to punish its oppo-
nents for past sins. See Fed. R. Civ. P. 26(b) advisory commit-
tee’s note (1946 amendments). To the extent taxpayers seek
sanctions, there is no basis for us to award sanctions in this
appeal for prelitigation conduct nor did the district court err
in declining to exercise its supervisory powers vis-a-vis the
alleged conduct of the government. Gomez v. Vernon, 255
F.3d 1118, 1134 (9th Cir. 2001) (holding that where a party
has not acted in bad faith during the litigation, inherent pow-
ers sanctions are not appropriate).

tion of the United States is established initially by the Government’s
answer to the petition” but stopping short of articulating a bright-line rule
to that effect); see also Wade v. United States, 865 F. Supp. 216, 219-20
(D.N.J. 1994) (holding that a court may consider the government’s pre-
answer conduct, such as motions to dismiss, in deciding whether to award
attorneys’ fees under the statute).
4378        PACIFIC FISHERIES INC. v. UNITED STATES
   Although the IRS’s issuance of the administrative summon-
ses forced the taxpayers into litigation, we see no fees remedy
for them in the judicial proceeding. We conclude that their
case falls into a gap in the statute, but it is not our role to
bridge that gap.

  AFFIRMED.
