
    Dr. Rahinah IBRAHIM, an Individual, Plaintiff-Appellant, v. U.S. DEPARTMENT OF HOMELAND SECURITY; Terrorist Screening Center; Federal Bureau of Investigation; Christopher A. Wray, in His Official Capacity as Director of the Federal Bureau of Investigation; Kirstjen Nielsen, in Her Official Capacity as Secretary of the Department of Homeland Security; Matthew G. Whitaker, in His Official Capacity as Acting Attorney General; Charles H. Kable IV, in His Official Capacity as Director of the Terrorist Screening Center; Jay S. Tabb, Jr., in His Official Capacity as Executive Assistant Director of the FBI's National Security Branch; National Counterterrorism Center; Russell "Russ" Travers, in His Official Capacity as Director of the National Counterterrorism Center; Department of State; Michael R. Pompeo, in His Official Capacity as Secretary of State; United States of America, Defendants-Appellees.
    Nos. 14-16161 14-17272
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted En Banc March 20, 2018 San Francisco, California Filed January 2, 2019
    Marwa Elzankaly (argued), Jennifer Murakami, Ruby Kazi, Christine Peek, Elizabeth Pipkin, and James McManis, McManis Faulkner, San Jose, California, for Plaintiff-Appellant.
    Joshua Waldman (argued) and Sharon Swingle, Appellate Staff, Civil Division, United States Department of Justice, Washington, D.C., for Defendants-Appellees.
    Chet A. Kronenberg and JoAnne S. Jennings, Simpson Thacher & Bartlett LLP, Los Angeles, California, for Amici Curiae American Civil Liberties Union of California, Asian Americans Advancing Justice-Asian Law Caucus, Asian Americans Advancing Justice-Los Angeles, Center for Constitutional Rights, Electronic Frontier Foundation, and National Immigration Law Center.
    Before: Sidney R. Thomas, Chief Judge, and M. Margaret McKeown, Kim McLane Wardlaw, William A. Fletcher, Marsha S. Berzon, Consuelo M. Callahan, Milan D. Smith, Jr., N. Randy Smith, Morgan Christen, Jacqueline H. Nguyen, and Paul J. Watford, Circuit Judges.
    Partial Concurrence and Partial Dissent by Judge Callahan
    
      
      Current cabinet members and other federal officials have been substituted for their predecessors pursuant to Rule 43(c)(2) of the Federal Rules of Appellate Procedure.
    
   WARDLAW, Circuit Judge:

This appeal arises out of Dr. Rahinah Ibrahim's 2005 detention at the San Francisco International Airport (SFO) while en route to Malaysia with a stopover in Hawaii for a Stanford University conference. U.S. authorities detained Dr. Ibrahim because her name was on the Transportation Security Administration's (TSA) "No Fly"

list (the No Fly list). After almost a decade of vigorous and fiercely contested litigation against our state and federal governments and their officials, including two appeals to our court and a weeklong trial, Dr. Ibrahim won a complete victory. In 2014, the federal government at last conceded that she poses no threat to our safety or national security, has never posed a threat to national security, and should never have been placed on the No Fly list. Through Dr. Ibrahim's persistent discovery efforts, which were met with stubborn opposition at every turn, she learned that she had been nominated to the No Fly list and the Interagency Border Inspection System (IBIS), which are stored within the national Terrorist Screening Database (TSDB)-the federal government's centralized watchlist of known and suspected terrorists-and which serve as a basis for selection for other counterterrorism sub-lists. From there, a Federal Bureau of Investigation (FBI) special agent so misread a nomination form that he accidentally nominated Dr. Ibrahim to the No Fly list, intending to do the opposite, as the No Fly list is supposed to be comprised of individuals who pose a threat to civil aviation.

But Dr. Ibrahim did not accomplish this litigation victory on her own. Indeed, since she was finally allowed to travel to Malaysia in 2005, the United States government has never allowed her to return to the United States, not even to attend the trial that cleared her name. Throughout this hard-fought litigation, the civil rights law firm McManis Faulkner has represented her interests without pay, but with the understanding that if it prevailed on her behalf, it could recover reasonable attorneys' fees and expenses, in addition to costs, pursuant to the Equal Access to Justice Act (EAJA), 28 U.S.C. § 2412.

The firm filed a motion for an award of attorneys' fees and expenses, supported by documentary evidence and declarations, which the government opposed. The motion was met with the "compliments" of the district court and drastic reductions in the claimed fees, by almost ninety percent. In reducing the claimed legal fees, the district court misapplied Commissioner, I.N.S. v. Jean , 496 U.S. 154, 110 S.Ct. 2316, 110 L.Ed.2d 134 (1990), by taking a piecemeal approach to determining whether the government's position was "substantially justified," and so disallowing fees for particular stages of proceedings rather than examining the record as a whole and making a single finding. The district court further erred by treating alternative claims or theories for the same relief Dr. Ibrahim achieved-which the court, therefore, did not reach-as unsuccessful, and reducing fees for work pursuing those claims, contrary to Hensley v. Eckerhart , 461 U.S. 424, 103 S.Ct. 1933, 76 L.Ed.2d 40 (1983). These errors were compounded by the now-withdrawn three-judge panel decision, which misapplied the Hensley standard for determining "relatedness," i.e., whether the claims arose from a "common course of conduct," to wrongly conclude that because the claims in the alternative were "mutually exclusive," they were not related. In point of fact, all of the legal theories pursued on behalf of Dr. Ibrahim challenged the same and only government action at the heart of this lawsuit: the government's placement of her name on the No Fly list without any basis for doing so. Finally, our prior precedent, which we now reaffirm, requires that when a district court analyzes whether the government acted in bad faith, it must consider the totality of the circumstances, including both the underlying agency action and the litigation in defense of that action.

We reheard this appeal en banc to clarify the standards applicable to awards of attorneys' fees under the EAJA. We now reverse, vacate the award of attorneys'

fees, and remand with instructions to recalculate fees consistent with this opinion.

I.

A. Dr. Ibrahim

Dr. Ibrahim is a Muslim woman, scholar, wife, and mother of four children. She lived in the United States for thirteen years pursuing undergraduate and post-graduate studies. Here's what happened to Dr. Ibrahim, as the events that ultimately excluded her from this country unraveled:

In early January 2005, Dr. Ibrahim planned to fly from San Francisco to Hawaii and then to Los Angeles and on to Kuala Lumpur. She intended to attend a conference in Hawaii sponsored by Stanford University from January 3 to January 6, at which she would present the results of her doctoral research. She was then working toward a Ph.D. in construction engineering and management at Stanford University under an F-1 student visa. On January 2, 2005, Dr. Ibrahim arrived at SFO with her daughter, Rafeah, then fourteen. At the time, Dr. Ibrahim was still recovering from a hysterectomy performed three months earlier and required wheelchair assistance.

When Dr. Ibrahim arrived at the United Airlines counter, the airline staff discovered her name on the No Fly list and called the police. Dr. Ibrahim was handcuffed and arrested. She was escorted to a police car (while handcuffed) and transported to a holding cell by male police officers, where she was searched for weapons and held for approximately two hours. Paramedics were called to administer medication related to her surgery. No one explained to Dr. Ibrahim the reasons for her arrest and detention.

Eventually, she was released and an aviation security inspector with the Department of Homeland Security (DHS) informed Dr. Ibrahim that her name had been removed from the No Fly list. The police were satisfied that there were insufficient grounds for making a criminal complaint against her. Dr. Ibrahim was told that she could fly to Hawaii the next day.

The next day she returned to SFO where an unspecified person told her that she was again-or still-on the No Fly list. She was nonetheless allowed to fly, but was issued an unusual red boarding pass with the letters "SSSS," meaning Secondary Security Screening Selection, printed on it. Dr. Ibrahim flew to Hawaii and presented her doctoral findings at the Stanford conference. From there, she flew to Los Angeles and then on to Kuala Lumpur.

Two months later, on March 10, 2005, Dr. Ibrahim was scheduled to return to Stanford University to complete her work on her Ph.D. and to meet with an individual who was one of her Stanford dissertation advisors and also her friend, Professor Boyd Paulson, who was very ill. But when she arrived at the Kuala Lumpur International Airport, she was not permitted to board the flight to the United States. She was told by one ticketing agent that she would have to wait for clearance from the U.S. Embassy, and by another that a note by her name indicated the police should be called to arrest her. Dr. Ibrahim has not been permitted to return to the United States to this day.

On March 24, 2005, Dr. Ibrahim submitted a Passenger Identity Verification Form (PIVF) to TSA. Before 2007, individuals who claimed they were denied or delayed boarding a plane in or for, or entry to, the United States, or claimed they were repeatedly subjected to additional screening or inspection, could submit a PIVF to TSA. A PIVF prompted various agencies to review whether an individual was properly placed in the TSDB or in related watchlist databases.

Next, on April 14, 2005, the U.S. Embassy in Kuala Lumpur wrote to inform Dr. Ibrahim that the Department of State had revoked her F-1 student visa on January 31, 2005, which seemed to explain why she had not been allowed to fly in March, but gave her no further information regarding her status. The April 14 letter cited Dr. Ibrahim's possible ineligibility "under Section 212(a)(3)(B) of the Immigration and Nationality Act [ (INA) ]," codified at 8 U.S.C § 1182(a)(3)(B), to explain the revocation. That section prohibits entry into the U.S. by any person who engaged in terrorist activity, was reasonably believed to be engaged in or likely to be engaged in terrorist activity, or who has incited terrorist activity, among other things. 8 U.S.C. § 1182(a)(3)(B). However, the letter also told her that the revocation did "not necessarily indicate that [she would be] ineligible to receive a U.S. visa in [the] future." Not having heard back from TSA, Dr. Ibrahim retained McManis Faulkner. And on January 27, 2006, she filed the underlying action to challenge her placement on the No Fly list, as well as the federal and state governments' administration of the list and their treatment of her with respect to it.

In a letter dated March 1, 2006, Dr. Ibrahim received a response to her PIVF. That letter stated that TSA had "conducted a review of any applicable records in consultation with other federal agencies, as appropriate," and continued, "[w]here it has been determined that a correction to records is warranted, these records have been modified to address any delay or denial of boarding that you may have experienced as a result of the watchlist screening process." The letter did not indicate Dr. Ibrahim's status with respect to the No Fly list or any other federal watchlist.

In 2009, Dr. Ibrahim applied for a visa to attend proceedings in this action. The U.S. Embassy in Kuala Lumpur interviewed her on September 29, 2009. On December 14, 2009, a consular officer of the U.S. Department of State sent a letter to Dr. Ibrahim notifying her of her visa application's denial. The consular officer wrote the word "(Terrorist)" next to the checked box for INA § 212(a)(3)(B) on an accompanying form to explain why Dr. Ibrahim was deemed inadmissible.

In September 2013, Dr. Ibrahim submitted a visa application so that she could attend the trial in her case. She went to a consular officer interview in October 2013. At the interview, the consular officer asked her to provide supplemental information via e-mail, which Dr. Ibrahim duly provided. Trial in this action began on December 2 and ended on December 6. While she did not receive a response to her visa application before trial, at trial, government counsel stated that the visa had been denied. Dr. Ibrahim's counsel said that they had not been aware of the denial and that Dr. Ibrahim had not been notified.

B. United States Government

While Dr. Ibrahim stood in limbo, unaware of her status on any list and unable to return to the United States, even to attend the trial of her own case, the government was well aware that her placement on the No Fly list was a mistake from the get-go.

Here it is helpful to understand, as much as we can on this record, how the U.S. "government maintains and operates a web of interlocking watchlists, all now centered on the [TSDB]," as described in the district court's post-trial order. The FBI, DHS, the Department of State, and other agencies administer an organization called the Terrorist Screening Center (TSC), which manages the TSDB. Both the TSC and TSDB were created in response to the terrorist attacks on September 11, 2001, in order to centralize information about known and suspected terrorists. That information is then exported as appropriate to various "customer databases," i.e., government watchlists, operated by other agencies and government entities. In this way, "the dots could be connected." While the TSDB does not contain classified information, the government stores classified "derogatory" information in a closely allied and separate database called the Terrorist Identities Datamart Environment (TIDE), which is operated by the National Counterterrorism Center (NCTC) branch of the Office of the Director of National Intelligence. These terrorist watchlists, and others, provide information to the United States intelligence community, a coalition of seventeen agencies and organizations within the executive branch, and also provide information to certain foreign governments.

Today, individuals are generally nominated to the TSDB using a "reasonable suspicion standard," meaning "articulable facts which, taken together with rational inferences, reasonably warrant the determination that an individual is known or suspected to be or has been engaged in conduct constituting, in preparation for, in aid of, or related to terrorism and terrorist activities." This standard was created by executive branch policy and practice and was not promulgated by Congress or the judicial branch. However, from 2004 to 2007, the executive branch and its agencies employed no uniform standard for TSDB nominations, allowing each agency to use its own nominating procedures for inclusion in the TSDB based on each agency's interpretation of homeland security presidential directives and the memorandum of opinion that established the TSC. These directives provided little instruction. For example, one such directive was Homeland Security Presidential Directive 6 (HSPD-6), which stated, "[t]his directive shall be implemented in a manner consistent with the provisions of the Constitution and applicable laws, including those protecting the rights of all Americans."

As the centralized database, the TSDB is the repository for all watchlist nominations. Various government agents nominate individuals by filling out a physical form, which is later computerized and used by the TSDB to indicate on which watchlist each nominee should be included or excluded. There are several watchlists affected by the TSDB, namely :

• the No Fly list (TSA);
• the Selectee list (TSA);
• Known and Suspected Terrorist File (KSTF, previously known as the Violent Gang and Terrorist Organizations File);
• Consular Lookout and Support System (CLASS, including CLASS-Visa, a Department of State database used for screening of visa applicants, and CLASS-Passport, a database that applies only to United States citizens who might be watchlisted) (Department of State);
• TECS (not an acronym, but the successor to the Treasury Enforcement Communications System) (DHS);
• Interagency Border Inspection System (IBIS) (DHS);
• Tipoff United States-Canada (TUSCAN) (used to export information from the United States to Canada); and
• Tipoff Australia Counterterrorism Information Control System (TACTICS) (used to export information from the United States to Australia).

These TSDB designations are then exported to the customer/government watchlists, which are each operated by various government entities and used in various ways. For example, TSDB nominations are transmitted to the Department of State for inclusion in CLASS-Visa or CLASS-Passport. In ruling on visa applications, consular officers review the CLASS database for information that may inform the visa application and adjudication process.

In November 2004, shortly after Dr. Ibrahim's husband Mustafa Kamal Mohammed Zaini visited her from Malaysia to help her after her surgery, FBI Special Agent Kevin Michael Kelley (Agent Kelley), located in San Jose, California, unintentionally nominated Dr. Ibrahim, who was then a graduate student at Stanford University, to various federal watchlists using the FBI's National Crime Information Center (NCIC) Violent Gang and Terrorist Organizations (VGTO) File Gang Member Entry Form (VGTOF). VGTO was an office within NCIC. Agent Kelley misunderstood the directions on the form and erroneously nominated Dr. Ibrahim to the TSA's No Fly list and DHS's IBIS. He did not intend to do so.

Agent Kelley testified at trial that he intended to nominate Dr. Ibrahim to the CLASS, the TSA Selectee list, TUSCAN (information exported to Canada), and TACTICS (information exported to Australia) lists. He checked the wrong boxes, filling out the form exactly contrary to the form's instructions. The form expressly indicated that he was to check the boxes for the databases into which the subject should NOT be placed. Here is a blank copy of the form:

It is recommended that the subject NOT be entered into the following selected terrorist screening databases: [] Consular Lookout and Support System (CLASS) [] Interagency Border Information System (IBIS) [] TSA No Fly List [] TSA Selectee List [] TUSCAN [] TACTICS . . . The case agent will also nominate any terrorist screening database into which the subject should not be entered. If no databases are selected, then the subject will be added by the TSC to all appropriate databases.

In other words, Agent Kelley was instructed to check the boxes for the watchlists for which Dr. Ibrahim was NOT to be nominated. Here is the form as Agent Kelley completed it:

Agent Kelley, by failing to check the boxes for the No Fly list and IBIS, placed Dr. Ibrahim on those watchlists (and by checking the boxes for CLASS, the TSA Selectee list, TUSCAN, and TACTICS, Agent Kelley did not place her on those lists).

Agent Kelley's squad also was conducting a mosque outreach program. One purpose of the program was to provide a point of contact between law enforcement and mosques and Islamic associations. The outreach program included Muslim and Sikh communities and organizations in the San Francisco Bay Area. In December 2004, Agent Kelley and his colleague interviewed Dr. Ibrahim while she was still attending Stanford University. He asked, among other things, about her plans to attend a conference in Hawaii, her dissertation work, her plans after graduation, her involvement in the Muslim community, her husband, her travel plans, and the organization Jemaah Islamiyah, a Department of State-designated terrorist organization that Dr. Ibrahim had heard of only on the news. She was not a member. The Freedom of Information Act-produced version of Agent Kelley's interview notes with Dr. Ibrahim were designated by the FBI as "315," which denotes "International Terrorism Investigations."

On January 2, 2005, when Dr. Ibrahim was detained at SFO on her way to Hawaii, a DHS aviation security inspector told her that her name had been removed from the list.

Meanwhile, on January 3, 2005, in the visa office of the Department of State, one official was sitting on a stack of pending visa revocations that were based on the VGTO watchlist from which Agent Kelley had nominated Dr. Ibrahim to the No Fly list. That official e-mailed another visa official to report that although "[t]hese revocations contain virtually no derogatory information," he was going to revoke them. The official wrote, because "there is no practical way to determine the basis of the investigation ... we will accept that the opening of an investigation itself is a prima facie indicator of potential ineligibility under [§ 212(a)(3)(B) of the INA, relating to terrorist activities]." One of the revocations in that stack was Dr. Ibrahim's student visa.

Sure enough, on January 31, 2005, the Department of State revoked Dr. Ibrahim's F-1 student visa pursuant to § 212(a)(3)(B). In an e-mail conversation dated February 8, 2005 between the chief of the consular section at the U.S. Embassy in Kuala Lumpur and an official in the coordination division at the Department of State's visa office, designated "VO/L/C," the consular chief asked about a prudential visa revocation cable he had received concerning the events Dr. Ibrahim experienced in January 2005. The Department of State official replied,

I handle revocations in VO/L/C. The short version is that this person's visa was revoked because there is law enforcement interest in her as a potential terrorist. This is sufficient to prudentially revoke a visa but doesn't constitute a finding of ineligibility. The idea is to revoke first and resolve the issues later in the context of a new visa application .... My guess based on past experience is that she's probably issuable. However, there's no way to be sure without putting her through the interagency process.

After Dr. Ibrahim's visa was revoked, the Department of State entered a record into CLASS that notified any consular official adjudicating a future visa application on her behalf that she may be inadmissible under § 212(a)(3)(B). In December 2005, Dr. Ibrahim was removed from the TSA's Selectee list. Around this time, however, she was added to TACTICS (exports to Australia) and TUSCAN (exports to Canada). The government has never explained this placement or the effect of Dr. Ibrahim's placement on TACTICS or TUSCAN.

Two weeks later, on January 27, 2006, Dr. Ibrahim filed the underlying action. On February 10, 2006, an unidentified government agent requested that Dr. Ibrahim be "Remove[d] From ALL Watchlisting Supported Systems (For terrorist subjects: due to closure of case AND no nexus to terrorism)." Answering the question "Is the individual qualified for placement on the no fly list?" the "No" box was checked. For the question, "If No, is the individual qualified for placement on the selectee list?" the "No" box was checked.

On September 18, 2006, the government removed Dr. Ibrahim from the TSDB because she did not meet the "reasonable suspicion standard" for placement on it, which requires that the government believe "an individual is known or suspected to be or has been engaged in conduct constituting, in preparation for, in aid of, or related to terrorism and terrorist activities." The record, however, does not indicate whether she was removed from all of the customer watchlists that subscribed to the TSDB.

On March 2, 2007, Dr. Ibrahim was placed back on the TSDB. The record does not explain why she was relisted on the TSDB or which customer watchlists were to be notified. Two months later, however, on May 30, 2007, Dr. Ibrahim was again removed from the TSDB. The record does not show the extent to which Dr. Ibrahim's name was then removed from the other customer watchlists, nor the reason for the removal.

Dr. Ibrahim's 2009 visa application to attend proceedings in this case was initially refused under § 221(g) of the INA, 8 U.S.C. § 1201(g), because it was determined that there was insufficient information to make a final adjudication in the matter. The consular officer requested a Security Advisory Opinion from the Department of State. The consular official was concerned that Dr. Ibrahim was potentially inadmissible under § 212(a)(3)(B) of the INA, which provides nine classes of aliens ineligible for visas or admission into the United States based on terrorist activities. The Security Advisory Opinion from the Department of State, initially unavailable to Dr. Ibrahim but later produced in discovery, stated:

Information on this applicant surfaced during the SAO review that would support a 212(a)(3)(B) inadmissibility finding. Posts should refuse the case accordingly. Since the Department reports all visa refusals under INA Section 212(a)(3)(B) to Congress, post should notify [the Coordination Division within the Visa Office] when the visa refusal is affected [sic]. There has been no request for an INA section 212(d)(3)(A) waiver at this time.

Based on the Security Advisory Opinion's finding, the consular officer denied her visa application, and wrote the word "(Terrorist)" on the form to explain the inadmissibility determination to Dr. Ibrahim.

On October 20, 2009, Dr. Ibrahim was again nominated to the TSDB pursuant to a secret exception to the reasonable suspicion standard. The government claims that the nature of the exception and the reasons for the nomination are state secrets. In Dr. Ibrahim's circumstance, the effect of the nomination was that Dr. Ibrahim's information was exported from the TSDB database solely to the Department of State's CLASS database and DHS's TECS database.

From October 2009 to the present, Dr. Ibrahim has been included on the TSDB, CLASS, and TECS watchlists. She has been off the No Fly and Selectee lists. She remains in the TSDB, even though she does not meet the "reasonable suspicion standard," pursuant to a classified and secret exception to that standard.

Government counsel conceded at trial that Dr. Ibrahim was not a threat to the national security of the United States and that she never has been. She did not pose (and has not posed) a threat of committing an act of international or domestic terrorism with respect to an aircraft, a threat to airline passenger or civil aviation security, or a threat of domestic terrorism. Despite this assessment, Dr. Ibrahim has been unable to return to the United States to this day.

II.

On January 27, 2006, Dr. Ibrahim filed suit against DHS, TSA, the TSC, the FBI, the Federal Aviation Administration (FAA), and individuals associated with these entities (collectively, the federal defendants); the City and County of San Francisco, the San Francisco Police Department, SFO, the County of San Mateo, and individuals associated with these entities (collectively, the city defendants); and United Airlines, UAL Corporation, and individuals associated with these entities (collectively, the private defendants). Dr. Ibrahim asserted § 1983 claims and state-law tort claims arising out of her detention at SFO, as well as several constitutional claims based on the inclusion of her name on government terrorist watchlists. On August 16, 2006, the district court dismissed her claims against the federal defendants under 49 U.S.C. § 46110(a), which vests exclusive original jurisdiction in the courts of appeals over suits challenging security orders issued by TSA. The order also dismissed Dr. Ibrahim's claims against a TSA employee and the airline. Dr. Ibrahim appealed.

We affirmed in part, reversed in part, and remanded. We reversed the district court's dismissal of the federal defendants, holding that § 46110(a) does not bar district court jurisdiction over Dr. Ibrahim's challenges to her placement on the government terrorist watchlists, including the No Fly list, because the lists are managed by the TSC rather than TSA. Ibrahim v. Dep't of Homeland Sec ., 538 F.3d 1250, 1254-56 (9th Cir. 2008) ( Ibrahim I ). We affirmed the district court's conclusions that § 46110(a) requires all challenges to TSA policies and procedures implementing the No Fly and other lists to be filed directly in the courts of appeals, that the federal agency and airline actions were not state actions under § 1983, and that the tort claims against the federal officials in their official capacities and against the airline defendants were precluded. Id . at 1256-58. We further held that the district court had personal jurisdiction over the claims against the TSA employee, who was sued in his individual capacity. Id. at 1258-59. We remanded the issue of standing to the district court to decide in the first instance. Id. at 1254-56, 1256 n.9.

After we remanded the case, Dr. Ibrahim filed a Second Amended Complaint (SAC), alleging various Bivens , constitutional, § 1983, statutory, state tort, and Administrative Procedure Act (APA) claims against several federal agencies and federal officials in their official capacities (collectively, the Federal Defendants) and state and local government agencies, certain individuals in their individual capacities, and the U.S. Investigation Services, Inc. (collectively, the Non-Federal Defendants). Dr. Ibrahim requested an injunction that would require the federal government to take her name off its terrorist watchlists, including the No Fly list, or, in the alternative, to provide procedures under which she could challenge her inclusion on those lists, in addition to other non-monetary requests and damages. The SAC also sought limited relief relevant to Dr. Ibrahim's visa denial, but stopped short of attempting to force the government to issue her a visa.

Both the Federal Defendants and Non-Federal Defendants filed motions to dismiss with respect to the majority of the claims. In an order dated July 27, 2009, the district court partially granted the Non-Federal Defendants' motions to dismiss. Thereafter, all of the Non-Federal Defendants entered into cash settlements with Dr. Ibrahim.

In the same order, the district court again dismissed Dr. Ibrahim's claims against the Federal Defendants. These claims alleged that the inclusion of Dr. Ibrahim's name on the government's terrorist watchlists violated her First Amendment right to freedom of association and her Fifth Amendment rights to due process and equal protection. She also alleged that the Federal Defendants violated the APA, arguing that the APA waives the sovereign immunity of the United States, thereby allowing her claims under the First and Fifth Amendments and authorizing remedies for those claims.

The district court held that while Dr. Ibrahim could seek damages for her past injury at SFO (and had successfully settled that part of the case), she had voluntarily left the United States and, as a nonimmigrant alien abroad, no longer had standing to assert constitutional and statutory claims to seek prospective relief. The district court held that, although nonimmigrant aliens in the United States had standing to assert constitutional and statutory claims, a nonimmigrant alien who had voluntarily left the United States and was at large abroad had no standing to assert federal claims for prospective relief in our federal courts. Dr. Ibrahim filed a second appeal.

We affirmed in part, but reversed as to prospective standing by holding that even a nonimmigrant alien who had voluntarily left the United States nonetheless has standing to litigate federal constitutional claims in the district courts of the United States so long as the alien had a "substantial voluntary connection" to the United States. Ibrahim v. Dep't of Homeland Sec. , 669 F.3d 983, 996 (9th Cir. 2012) ( Ibrahim II ). We held that Dr. Ibrahim had such a connection because of her time at Stanford University, her continuing collaboration with professors in the United States, her membership in several professional organizations located in the United States, the invitations for her to return, and her network of close friends in the United States. Id. at 993-94, 996. The government did not seek review by the Supreme Court.

Following the second remand, the government again filed a motion to dismiss, which the district court denied. Despite the unequivocal pronouncement from our court and the district court that Dr. Ibrahim had adequately pleaded Article III standing, the government argued over the next year that Dr. Ibrahim lacked standing. The government made this argument in its third motion to dismiss, its motion for summary judgment, its statements during trial, and its proposed findings of fact and conclusions of law. The government persisted, even though it was abundantly clear that "the standing issue had gone the other way on appeal."

From the February 2012 remand through trial, the parties and the district court were embroiled in discovery disputes involving the state secrets privilege, the law enforcement privilege, and assertions of "sensitive security information" (SSI), 49 C.F.R. § 1520.5. The government invoked these as bases for withholding classified and otherwise allegedly sensitive government information from Dr. Ibrahim and her counsel.

On April 19, 2013, after years of litigation, the district court finally issued two orders granting in part and denying in part Dr. Ibrahim's motions to compel discovery. Resolving these disputes required the district court judge to review individually each of the documents Dr. Ibrahim sought. Most of this review was conducted ex parte and in camera due to the privileged, classified, or secret nature of the documents. The state secrets privilege was upheld as to nearly all of the classified documents in question. The government's assertion of other privileges regarding non-classified documents was overruled as to the majority of the remaining documents. The district court compelled the government to release information specifically related to Dr. Ibrahim's watchlist history, in addition to her current watchlist statuses. It also required the government to produce Federal Rule of Civil Procedure 30(b)(6) witnesses.

At last, Dr. Ibrahim and her attorneys were able to learn what the government had known all along. On May 2, 2013, the government stated that Dr. Ibrahim was inadvertently placed on the No-Fly list but did not explain the details of this mistake, or who was involved. On May 2, 2013, when the government responded to Dr. Ibrahim's interrogatory requests, Dr. Ibrahim learned, for the first time, her historical and current watchlist statuses. On September 12, 2013, again over the government's vigorous objections, Dr. Ibrahim's attorneys deposed Agent Kelley and learned that her placement on the No Fly and IBIS watchlists was, in fact, a mistake based on Agent Kelley's misreading of the form. In sum, the government failed to reveal that Dr. Ibrahim's placement on the No Fly list was a mistake until two months before trial, and eight years after Dr. Ibrahim filed suit. And at all times, as the government vigorously contested Dr. Ibrahim's discovery requests, and lodged over two hundred objections and instructions not to answer questions in depositions, the government was aware that she was not responsible for terrorism or any threats against the United States.

The government's discovery games stretched up to and through trial. The government announced on at least two occasions that if it invoked the state secrets privilege to withhold information, then that evidence could not be relied upon by either side at trial. After making such representations on the record, on September 13, 2013, the district court ordered the government to confirm that neither party could use information withheld on grounds of state secrets privilege. The government affirmed it would not rely on any information withheld on grounds of privilege from Dr. Ibrahim. The government nevertheless reversed course during trial and sought to prevail by having this action dismissed due to its inability to disclose state secrets.

The government also filed a motion for summary judgment. A hearing was held on the government's motion on October 31, 2013. Instead of discussing the merits of the summary judgment motion, the government used the vast majority of the hearing time to discuss whether or not the trial should be open to the public and whether certain information listed on Dr. Ibrahim's demonstratives was subject to various privileges. The district court ultimately declined to hear further argument and decided the motion on the papers.

The government's motion for summary judgment was granted in limited part but mostly denied on November 4, 2013. Dr. Ibrahim's "exchange of information" claim based on the First Amendment was dismissed. Dr. Ibrahim's claims based on procedural and substantive due process, equal protection, and First Amendment rights of expressive association and against retaliation proceeded to trial. The government raised lack of standing, yet again, and was denied, yet again. For the first time, and contrary to what it had represented before, the government further argued that summary judgment in its favor was appropriate based on the state secrets privilege, pursuant to our court's decision in Mohamed v. Jeppesen Dataplan, Inc. , 614 F.3d 1070, 1079 (9th Cir. 2010) (en banc) (noting that even when evidence is excluded via an invocation of state secrets, the case may still need to be dismissed because "it will become apparent during the [ United States v. Reynolds , 345 U.S. 1, 73 S.Ct. 528, 97 L.Ed. 727 (1953) ] analysis that the case cannot proceed without privileged evidence, or that litigating the case to a judgment on the merits would present an unacceptable risk of disclosing state secrets").

At the final pretrial conference, the government made what amounted to a motion for reconsideration of its previously denied motion for summary judgment on state secrets grounds. The government argued that the action should be dismissed because the core of the case had been excluded as state secrets. The motion was denied on several grounds. First, the government had failed to raise such an argument until weeks before trial. Second, it was too late and too unsettling for the government to reverse its prior position. Third, even under Jeppesen , 614 F.3d at 1080, the district court could not say with certainty that Dr. Ibrahim would be unable to prove her case at trial or that the government would be absolutely deprived of a meritorious and complete defense. The district court planned to allow both sides to present their unclassified evidence through the "normal" trial procedure and then to allow the government to submit an ex parte and under seal submission to try to explain how its state secrets might bear on the actual trial issues. Surprisingly, although no classified information was used at trial, the government made numerous privilege assertions and motions to close the courtroom. Due to these assertions, the district judge at least ten times "reluctantly" asked the press and the public to leave the courtroom.

On December 2, 2013, the first day of trial, before opening statements, Dr. Ibrahim's counsel reported that Dr. Ibrahim's daughter-a U.S. citizen born in the United States and a witness disclosed on Dr. Ibrahim's witness list-was not permitted to board her flight from Kuala Lumpur to attend trial, evidently because she too was now on the No Fly list. Consequently, Dr. Ibrahim's daughter missed her flight and was forced to reschedule. The district court concluded this was a mistake, and the government quickly remedied this error.

After a one-week bench trial, in the first No Fly list trial ever conducted, the district court found in Dr. Ibrahim's favor on her procedural due process claim and ordered the government to remove all references to the mistaken designations by Agent Kelley in 2004 on all terrorist watchlist databases and records; to inform Dr. Ibrahim of the specific subsection of the INA that rendered Dr. Ibrahim ineligible for a visa in 2009 and 2013; to inform Dr. Ibrahim she is no longer on the No Fly list and has not been since 2005; and to inform Dr. Ibrahim that she is eligible to apply for a discretionary visa waiver under 8 U.S.C. § 1182(3)(D)(iv) and 22 C.F.R. § 41.121(b)(1). The district court declined to reach Dr. Ibrahim's substantive due process, equal protection, First Amendment, and APA claims, because "those arguments, even if successful, would not lead to any greater relief than already ordered."

Having won an outstanding victory, Dr. Ibrahim's lawyers petitioned for fees under the EAJA. In the district court's April 15, 2014 fee order, although the district court applauded the lawyers' commitment to this difficult and unprecedented case, it awarded only limited compensation. The court acknowledged that Dr. Ibrahim "did not outright lose" on her substantive due process, equal protection, First Amendment, and APA claims, but treated those claims as "unsuccessful" when it calculated fees under Hensley . The district court found that her substantive due process and APA claims were related to the procedural due process claim on which she prevailed, so it allowed fees on these claims. But the court also ruled that her First Amendment and equal protection claims were not related to the successful claim, and denied fees for work performed on those claims. The district court also concluded that Dr. Ibrahim's counsel was not entitled to fees for work performed on Dr. Ibrahim's visa issues, the settlement with the Non-Federal Defendants, litigation of standing prior to Ibrahim II (although it permitted fees for time after Ibrahim II ), litigation of privilege issues, and other miscellaneous work. The district court also found that the government did not act in bad faith, that Dr. Ibrahim's counsel was not entitled to a rate enhancement beyond the $125 per hour fee stated in 28 U.S.C. § 2412(d)(2)(A)(ii), and that counsel was not entitled to fees as discovery sanctions pursuant to Federal Rules of Civil Procedure 37 and 16. The district court appointed a special master to determine the appropriate award of fees and costs based on the district court's findings.

Thereafter, the parties and the court engaged in a lengthy and contentious fee dispute before the special master. The district court ultimately adopted the special master's findings and reduced Dr. Ibrahim's fees for various witnesses and costs associated with those witnesses, expenses related to obtaining TSA clearance, costs that would be "reasonably charged" to the client, and costs for multiple copies of the same book; and rejected certain expenses for lack of supporting documentation or sufficient itemization. In total, Dr. Ibrahim sought $3,630,057.50 in market-rate attorneys' fees and $293,860.18 in expenses. On October 9, 2014, the district court ultimately awarded Dr. Ibrahim $419,987.36 in fees and $34,768.71 in expenses. Dr. Ibrahim appealed the underlying legal framework the district court utilized to determine the fees she was eligible to recover, various specific reductions to eligible fees, and the striking of her objections to the special master's recommendations.

On appeal, in the now-withdrawn panel opinion, our court adopted a number of the district court's rulings under a different approach. Ibrahim v. U.S. Dep't of Homeland Sec. , 835 F.3d 1048 (9th Cir. 2016), reh'g en banc granted , 878 F.3d 703 (9th Cir. 2017) ( Ibrahim III ). The three-judge panel concluded that "it was not an abuse of discretion to find that [Dr.] Ibrahim's unsuccessful claims were unrelated, because although the work done on those claims could have contributed to her ultimately successful claim, the facts and legal theories underlying [Dr.] Ibrahim's claims make that result unlikely." Id . at 1063. The panel rested this conclusion on the novel theory that, because the theories underlying claims the district court declined to reach were "mutually exclusive" to the successful claims, the unreached claims were unrelated. Id. at 1062-63. The panel also held that the district court incorrectly considered substantial justification at each stage of litigation; that the government did not act in bad faith; that the district court did not err in determining that Dr. Ibrahim had failed to abide by its page limits in objecting to the special master's report and recommendation; and that the district court did not abuse its discretion in striking Dr. Ibrahim's objections to the special master's report and recommendation. Id. at 1052, 1065-66.

We now clarify that when a district court awards complete relief on one claim, rendering it unnecessary to reach alternative claims, the alternative claims cannot be deemed unsuccessful for the purpose of calculating a fee award. We also reject the post hoc "mutual exclusivity" approach to determining whether "unsuccessful" claims are related to successful claims and reaffirm that Hensley sets forth the correct standard of "relatedness" for claims under the EAJA. And we reaffirm that in evaluating whether the government's position is substantially justified, we look at whether the government's and the underlying agency's positions were justified as a whole and not at each stage.

III.

We have jurisdiction pursuant to 28 U.S.C. § 1291. We review a district court's award of fees under the EAJA for abuse of discretion. Thomas v. City of Tacoma , 410 F.3d 644, 649 (9th Cir. 2005) ; Gonzales v. Free Speech Coal. , 408 F.3d 613, 618 (9th Cir. 2005) ; Schwarz v. Sec'y of Health & Human Servs ., 73 F.3d 895, 900 (9th Cir. 1995). We review a district court's finding on the question of bad faith for clear error. Cazares v. Barber , 959 F.2d 753, 754 (9th Cir. 1992). We review the district court's interpretation of the EAJA de novo. Edwards v. McMahon , 834 F.2d 796, 801 (9th Cir. 1987). "[A] district court's fee award will be overturned if it is based on an inaccurate view of the law or a clearly erroneous finding of fact." Corder v. Gates , 947 F.2d 374, 377 (9th Cir. 1991).

IV.

The parties now do not dispute that Dr. Ibrahim is entitled to attorneys' fees under the EAJA. What they do dispute is whether the amount of fees the district court awarded resulted from a proper application of the EAJA and common law.

In enacting the EAJA, Congress stated:

For many citizens, the costs of securing vindication of their rights and the inability to recover attorney fees preclude resort to the adjudicatory process. ... When the cost of contesting a Government order, for example, exceeds the amount at stake, a party has no realistic choice and no effective remedy. In these cases, it is more practical to endure an injustice than to contest it.

S. Rep. No. 96-253, at 5 (1979).

"The clearly stated objective of the EAJA 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. I.N.S. , 502 U.S. 129, 138, 112 S.Ct. 515, 116 L.Ed.2d 496 (1991) ; see also Jean , 496 U.S. at 163, 110 S.Ct. 2316 ("[T]he specific purpose of the EAJA is to eliminate for the average person the financial disincentive to challenge unreasonable governmental actions."). Congress specifically intended the EAJA to deter unreasonable agency conduct. Jean , 496 U.S. at 163 n.11, 110 S.Ct. 2316 (quoting the statement of purpose for the EAJA, Pub. L. No. 96-481, §§ 201-08, 94 Stat. 2321, 2325-30 (1980) ).

The policy behind the EAJA "is to encourage litigants to vindicate their rights where any level of the adjudicating agency has made some error in law or fact and has thereby forced the litigant to seek relief from a federal court. " Li v. Keisler , 505 F.3d 913, 919 (9th Cir. 2007). "[W]e have consistently held that regardless of the government's conduct in the federal court proceedings, unreasonable agency action at any level entitles the litigant to EAJA fees." Id.

"The EAJA applies to a wide range of awards in which the cost of litigating fee disputes would equal or exceed the cost of litigating the merits of the claim." Jean , 496 U.S. at 163-64, 110 S.Ct. 2316. The EAJA was designed to remedy this situation by providing for an award of reasonable attorneys' fees to a "prevailing party" in a "civil action" unless the position taken by the United States at issue "was substantially justified" or "special circumstances make an award unjust." Id. at 158, 110 S.Ct. 2316 ; 28 U.S.C. § 2412(d)(1)(A).

The EAJA specifically provides:

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

Thus, as the Supreme Court held in Jean :

eligibility for a fee award in any civil action requires: (1) that the claimant be "a prevailing party"; (2) that the Government's position was not "substantially justified"; (3) that no "special circumstances make an award unjust"; and, (4) pursuant to 28 U.S.C. § 2412(d)(1)(B), that any fee application be submitted to the court within 30 days of final judgment in the action and be supported by an itemized statement.

496 U.S. at 158, 110 S.Ct. 2316.

The district court correctly concluded that Dr. Ibrahim was the prevailing party in this case. The third and fourth Jean factors are not at issue. The only remaining issue as to Dr. Ibrahim's entitlement to fees is whether the government's position was substantially justified.

A. Substantial Justification

Where, as here, a movant under the EAJA has established that it is a prevailing party, "the burden is on the government to show that its litigation position was substantially justified on the law and the facts." Cinciarelli v. Reagan , 729 F.2d 801, 806 (D.C. Cir. 1984). To establish substantial justification, the government need not establish that it was correct or "justified to a high degree"-indeed, since the movant is established as a prevailing party it could never do so-but only that its position is one that "a reasonable person could think it correct, that is, [that the position] has a reasonable basis in law and fact."

Pierce v. Underwood , 487 U.S. 552, 565, 566 n.2, 108 S.Ct. 2541, 101 L.Ed.2d 490 (1988). That the government lost (on some issues) does not raise a presumption that its position was not substantially justified. Edwards , 834 F.2d at 802 (citation omitted). Fees may be denied when the litigation involves questions of first impression, but "whether an issue is one of first impression is but one factor to be considered." United States v. Marolf , 277 F.3d 1156, 1162 n.2 (9th Cir. 2002).

When evaluating the government's "position" under the EAJA, we consider both the government's litigation position and the "action or failure to act by the agency upon which the civil action is based." 28 U.S.C. § 2412(d)(1)(B). Thus, the substantial justification test is comprised of two inquiries, one directed toward the government agency's conduct, and the other toward the government's attorneys' conduct during litigation. See Gutierrez v. Barnhart , 274 F.3d 1255, 1259 (9th Cir. 2001). The test is an inclusive one; we consider whether the government's position "as a whole" has "a reasonable basis in both law and fact." Id . at 1258, 1261 ; see also Meier v. Colvin , 727 F.3d 867, 870 (9th Cir. 2013).

The district court, invoking our decision in Corbin v. Apfel , 149 F.3d 1051 (9th Cir. 1998), concluded that, in exceedingly complex cases, a court may appropriately determine whether the government was substantially justified at each "stage" of the litigation and make a fee award apportioned to those separate determinations. It accordingly disallowed fees for discrete positions taken by the government at different stages of the litigation because, in its view, the government's positions in each instance were substantially justified. This approach was error, as it is contrary to the Supreme Court's instructions in Jean .

In Jean , the Supreme Court rejected the government's argument that it could assert a " 'substantial justification' defense at multiple stages of an action." 496 U.S. at 158-59, 110 S.Ct. 2316. Examining the statutory language, the Court noted the complete absence of any textual support for this position. Id. at 159, 110 S.Ct. 2316. Moreover, "[s]ubsection (d)(1)(A) refers to an award of fees 'in any civil action' without any reference to separate parts of the litigation, such as discovery requests, fees, or appeals." Id. The Court also noted that "[t]he reference to 'the position of the United States' in the singular also suggests that the court need make only one finding about the justification of that position." Id. An amendment to the EAJA made clear 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." Pub. L. No. 99-80, § 2(c)(2)(B), 99 Stat. 183, 185 (1985) (codified at 28 U.S.C. § 2412(d)(2)(D) ). As the Court reiterated, "Congress' emphasis on the underlying Government action supports a single evaluation of past conduct." Jean , 496 U.S. at 159 n.7, 110 S.Ct. 2316 (citing H.R. Rep. No. 98-992, at 9, 13 (1984) ("[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."), and S. Rep. No. 98-586, at 10 (1984) ("Congress expressly recognized 'that the expense of correcting error on the part of the Government should not rest wholly on the party whose willingness to litigate or adjudicate has helped to define the limits of Federal authority.' " (citation omitted) ) ). The Jean Court concluded that "[t]he single finding that the Government's position lacks substantial justification, like the determination that a claimant is a 'prevailing party,' thus operates as a one-time threshold for fee eligibility." Id. at 160, 110 S.Ct. 2316.

In sum, "[a]ny given civil action can have numerous phases," as evidenced by the case at hand. Id. at 161, 110 S.Ct. 2316. But the Supreme Court clearly instructed, and almost all courts have clearly understood, that "the EAJA-like other fee-shifting statutes-favors treating a case as an inclusive whole, rather than as atomized line-items." Id. at 161-62, 110 S.Ct. 2316.

Our decision in Corbin is inapposite because that case hinged on jurisdictional features present when we review agency actions, but not present here. 149 F.3d 1051. In Corbin , a case involving judicial review of the agency's denial of disability benefits, we upheld EAJA fee awards that were apportioned to successive stages of the underlying litigation, in which we reversed and remanded for further proceedings before the agency.

Id. at 1052. Because Corbin prevailed upon judicial review and was the prevailing party at that stage-whatever the ultimate disposition of his disability claim-he was entitled to EAJA attorneys' fees. Id. at 1053. But, the administrative review context is unique because the different stages of the litigation are reviewed by different, unconnected quasi-judicial systems. In administrative review cases, we award fees when we vacate an administrative determination and require the agency to conduct new proceedings. See, e.g. , Rueda-Menicucci v. I.N.S. , 132 F.3d 493, 495 (9th Cir. 1997) (awarding fees to prevailing petitioners on a petition for review from a Board of Immigration Appeals proceeding without regard to whether they would later succeed on underlying asylum claims, explaining that "the remand terminates judicial proceedings and results in the entry of a final judgment"); Kelly v. Nicholson , 463 F.3d 1349, 1355-56 (Fed. Cir. 2006) (reversing and remanding denial of EAJA fees after an erroneous Agent Orange disability determination by the Department of Veterans Affairs); Former Emps. of Motorola Ceramic Prods. v. United States , 336 F.3d 1360, 1361 (Fed. Cir. 2003) (vacating and remanding denial of EAJA fees after an erroneous analysis of readjustment of benefits by the Department of Labor). This eligibility for fees arises whether the plaintiff challenges administrative action under a statute specifically providing for review, as with the examples above, or under an umbrella statute authorizing challenges to agency action, such as the APA. See, e.g. , Wood v. Burwell , 837 F.3d 969, 977 (9th Cir. 2016) (granting "prevailing party" status for success on an APA claim alleging procedural deficiencies, notwithstanding plaintiffs' later loss on their "substantive" claims). By contrast, the various stages at issue here were all part of one litigation in federal court; the case was never returned to an agency for further proceedings. Therefore, Corbin does not apply.

The district court thus erred in its piecemeal approach to substantial justification. Most fundamentally, the agency position upon which these going-on-thirteen years of litigation was based was not justified at all, much less substantially. The district court correctly recognized as much, finding: "The original sin-Agent Kelley's mistake and that he did not learn about his error until his deposition eight years later-was not reasonable" under the EAJA. Whether the error is attributable to the failure to train Agent Kelley, the counter-intuitive nature of the form (check the categories that do NOT apply), the lack of cross-checking or other verification procedures, or anti-Muslim animus (Agent Kelley interviewed Dr. Ibrahim on December 23, 2004, as part of an International Terrorism Investigation), the precise cause is irrelevant to, and does not mitigate, the lack of any basis to place Dr. Ibrahim on the list, nor does it justify a reduction in fees. See Marolf , 277 F.3d at 1159 (holding that EAJA "fees generally should be awarded where the government's underlying action was unreasonable even if the government advanced a reasonable litigation position").

The district court correctly concluded that the government's litigation position-to defend the indefensible, its No Fly list error-was not reasonable. As the district court stated, "[t]he government's defense of such inadequate due process in Dr. Ibrahim's circumstance-when she was concededly not a threat to national security-was not substantially justified."

Those conclusions should have been the end of the district court's EAJA eligibility analysis. After the government engaged in years of scorched earth litigation, it finally conceded during trial in December 2013 that Dr. Ibrahim is "not a threat to our country. She does not pose (and has not posed) a threat of committing an act of international or domestic terrorism with respect to an aircraft, a threat to airline passenger or civil aviation security, or a threat of domestic terrorism." But the government knew this in November 2004, when Agent Kelley completed the form; it knew it in January 2005, when the DHS agent told Dr. Ibrahim she was not on the No Fly list; and it was well aware of it two weeks after Dr. Ibrahim filed the underlying action, when a government agent ordered her "Remove[d] from ALL watchlisting supported systems (For terrorist subjects: due to closure of case AND no nexus to terrorism)" and further stated that Dr. Ibrahim was not qualified for placement on either the No Fly or TSA Selectee lists. Yet knowing this, the government essentially doubled-down over the course of the litigation with a no-holds-barred defense.

That some of the arguments made along the way by the government attorneys passed the straight face test until they were reversed on appeal does not persuade us that the government's position was substantially justified. And the court is to consider the government agencies' conduct during the course of this litigation as well. See 28 U.S.C. § 2412(d)(2)(D) (" '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"). From the suit's inception, the government agencies' actions, including their on-again, off-again placement of Dr. Ibrahim on various government watchlists; refusal to allow her to reenter the United States at all, even to attend her own trial; and delay of her U.S.-born, U.S.-citizen daughter's attendance at trial, were unreasonable and served only to drive up attorneys' fees. Indeed, as a consequence of the government's conduct, Dr. Ibrahim was deposed in London, England, as opposed to the Northern District of California-which also drove up the costs and fees.

In sum, neither the agencies' conduct nor the government's litigation position was substantially justified. The EAJA mandates that attorneys' fees be awarded to Dr. Ibrahim's attorneys, subject only to reasonableness review. Jean , 496 U.S. at 161, 110 S.Ct. 2316. "It remains for the district court to determine what fee is 'reasonable.' " Hensley , 461 U.S. at 433, 103 S.Ct. 1933.

B. Reasonableness

In Hensley , the Supreme Court set out a two-pronged approach for determining the amount of fees to be awarded when a plaintiff prevails on only some of his claims for relief or achieves "limited success." Sorenson v. Mink , 239 F.3d 1140, 1147 (9th Cir. 2001) (citing Hensley , 461 U.S. at 436-37, 103 S.Ct. 1933 ). First, we ask, "did the plaintiff fail to prevail on claims that were unrelated to the claims on which he succeeded?" Hensley , 461 U.S. at 434, 103 S.Ct. 1933. This inquiry rests on whether the "related claims involve a common core of facts or are based on related legal theories," Webb v. Sloan , 330 F.3d 1158, 1168 (9th Cir. 2003) (citing Hensley , 461 U.S. at 435, 103 S.Ct. 1933 ), with "the focus ... on whether the claims arose out of a common course of conduct," id. at 1169 (emphasis added) (citing Schwarz , 73 F.3d at 903 (interpreting Hensley ) ). Second, we ask whether "the plaintiff achieve[d] a level of success that makes the hours reasonably expended a satisfactory basis for making a fee award?" Hensley , 461 U.S. at 434, 103 S.Ct. 1933. If the court concludes the prevailing party achieved "excellent results," it may permit a full fee award-that is, the entirety of those hours reasonably expended on both the prevailing and unsuccessful but related claims. Id. at 435, 103 S.Ct. 1933 ; Schwarz , 73 F.3d at 905-06.

1. "Unsuccessful Claims"

The district court erroneously determined that Dr. Ibrahim was entitled to reasonable fees and expenses with respect to only her procedural due process claim, which provided her with substantial relief, and her related substantive due process and APA claims. Because Dr. Ibrahim's equal protection, APA, substantive due process, and First Amendment claims "would not lead to any greater relief than [what the district court had] already ordered," the district court declined to reach them. The district court then treated these unreached claims as unsuccessful, even while acknowledging that Dr. Ibrahim "did not outright lose on these claims," and disallowed counsel's reasonable fees and expenses on the "unrelated" First Amendment and equal protection claims. This overall approach was error.

The Hensley Court recognized that in complex civil rights litigation, plaintiffs may raise numerous claims, not all of which will be successful: "Litigants in good faith may raise alternative legal grounds for a desired outcome, and the court's rejection of or failure to reach certain grounds is not a sufficient reason for reducing a fee. The result is what matters." Hensley , 461 U.S. at 435, 103 S.Ct. 1933 (emphasis added). And where, as here, "a plaintiff has obtained excellent results, his attorney should recover a fully compensatory fee." Id. The district court's rationale-that because Dr. Ibrahim won substantial relief on one claim, and it was therefore unnecessary to reach her other equally pursued claims that could also lead to the same relief, no fees were available for the unreached claim-turns Hensley on its head.

We are aware of no court that has held that a plaintiff who obtains full relief on some claims, thereby rendering it unnecessary to reach the remaining claims, "lost" on the unreached claims. When confronted with this question, our sister circuits that have addressed the issue have uniformly declined to adopt the district court's analysis. The Sixth Circuit "decline[d] the government's invitation to apportion [plaintiff's] attorney fees to the single claim addressed in [its] previous opinion." Sakhawati v. Lynch , 839 F.3d 476, 480 (6th Cir. 2016). The Eighth Circuit also refused to reduce fees where the district court found in plaintiffs' favor on their state claim without reaching the federal claims, because plaintiffs' federal claims "were alternative grounds for the result the district court reached" and "plaintiffs fully achieved [their] goal by prevailing on their state constitutional claim." Emery v. Hunt , 272 F.3d 1042, 1047 (8th Cir. 2001). And the Seventh Circuit rejected defendants' argument that plaintiff did not succeed on her sexual harassment claim where "the court did not find in [defendant's] favor on the sexual harassment claim; it merely did not reach the merits of the issue." Dunning v. Simmons Airlines, Inc ., 62 F.3d 863, 874 (7th Cir. 1995).

We agree with our sister circuits that a district court's "failure to reach" certain grounds does not make those grounds "unsuccessful," and conclude that the district court clearly erred in holding that Dr. Ibrahim's unreached claims were "unsuccessful."

2. Related Claims

The district court and the original panel exacerbated this error in analyzing whether the claims the district court did not reach were related to her successful claims. The district court correctly concluded that Dr. Ibrahim's substantive due process and APA claims were related to her prevailing procedural due process claim and allowed recovery of some of those fees and expenses. Without much analysis, however, the district court also concluded that her equal protection and First Amendment claims were not related "because they involved different evidence, different theories, and arose from a different alleged course of conduct." The three-judge panel stepped into the breach with its newly devised "mutually exclusive" rationale to determine that the claims were unrelated because, after trial, the district court found that Dr. Ibrahim was placed on the No Fly list due to negligence, and her First Amendment and equal protection claims alleged intentional discrimination. The three-judge panel concluded that the two mens rea requirements were "mutually exclusive."

But both the district court and the now-withdrawn opinion failed to follow clear precedent to the contrary. The Court made clear in Hensley that, while hours spent on an unsuccessful claim "that is distinct in all respects from [the plaintiff's] successful claim" should be excluded, "[w]here a lawsuit consists of related claims, a plaintiff who has won substantial relief should not have his attorney's fee reduced simply because the district court did not adopt each contention raised." 461 U.S. at 440, 103 S.Ct. 1933. Construing the Hensley Court's statement that claims are "unrelated" if they are "entirely distinct and separate" from the prevailing claims, we have held that "related claims involve a common core of facts or are based on related legal theories." Webb , 330 F.3d at 1168 (citations omitted). We do not require commonality of both facts and law to conclude that claims are related. Id. Rather "the focus is to be on whether the unsuccessful and successful claims arose out of the same 'course of conduct.' If they didn't, they are unrelated under Hensley ." Schwarz , 73 F.3d at 903. The three-judge panel's introduction of the mutual-exclusivity test is contrary to Supreme Court precedent, our precedent, and the precedent of every other circuit interpreting Hensley that has addressed the question. We are aware of no other court that has adopted the mutual-exclusivity test, and we now disavow its use as a standard for relatedness.

All of Dr. Ibrahim's claims arose from a "common course of conduct" and are therefore related under Hensley . See Webb , 330 F.3d at 1169. The First Amended Complaint at bottom was a challenge to "defendants' administration, management, and implementation of the 'No-Fly List.' " Specifically, Dr. Ibrahim alleged that the manner in which the government created, maintained, updated, and disseminated the No Fly list led to the humiliating treatment she experienced at SFO in January 2005 and afterwards, as she was unable to learn whether she was on or off the list or why she was placed there in the first place. She alleged several alternative theories for this treatment, five of which ultimately went to trial against the federal government. That the government's actions arose from negligence or unconstitutional animus could not have been known until the case was tried, and we still do not know whether, in addition to Agent Kelley's negligence in placing her on the No Fly list, the government's initial interest in Dr. Ibrahim stemmed from its allegedly heightened interest in foreign students from Muslim countries here on U.S. student visas, or her husband's recent visit, or her regular attendance at a mosque, or her involvement in the Islamic Society of Stanford University, which, if true, would have shown discriminatory intent. And because the district court did not reach the First Amendment and equal protection claims, we will never know whether placement on the TSDB was a result of discrimination on the basis of her race, religion, country of origin, or association with Muslims and Muslim groups.

There is no question that all of these claims arise from the government's common course of conduct toward Dr. Ibrahim. To hold otherwise would ignore the realities of lawyering. As here, the key question in a lawsuit is often not what happened-but why. Before the litigation begins and while it is ongoing, the plaintiff and her lawyers cannot know for sure why someone else did something, but may, as here, have evidence suggesting various possibilities. So, as here, the plaintiff raises alternative claims and theories as to why something was done, some of which may be ultimately inconsistent, with regard to a single set of facts. The plaintiff's claims are then tested by dispositive motions, discovery, and perhaps (as happened here) trial. The fact that one claim or theory is eventually determined to be true does not mean that the claims were unrelated to one another.

It is common to plead that a defendant committed some act "intentionally, knowingly, or recklessly," or simultaneously to bring different claims premised on distinct mental states. This widely accepted litigation strategy is accommodated by the clear standard pronounced by the Supreme Court and previously applied by our court, which focuses on whether the claims are premised on an "entirely distinct and separate" set of facts, not whether they are based on different "mental states." The analysis in the now-withdrawn opinion shows that had it applied the correct standard, it would have recognized that all of Dr. Ibrahim's claims were based on the same set of facts-the placement of Dr. Ibrahim's name on the government's watchlists-regardless of what "mental state" was required to prove each particular claim. Ibrahim III , 835 F.3d at 1063 ("[I]f the government negligently placed [Dr.] Ibrahim on its watchlists because it failed to properly fill out a form, then it could not at the same time have intentionally placed [Dr.] Ibrahim on the list based on constitutionally protected attributes [Dr.] Ibrahim possesses, and vice versa.").

Allowing hindsight to creep in to fee awards also would put lawyers in an untenable ethical position. Res judicata bars claims that could have been raised in an earlier litigation that arise out of the same "transactional nucleus of facts." Owens v. Kaiser Found. Health Plan, Inc. , 244 F.3d 708, 714 (9th Cir. 2001) (internal quotation marks and citation omitted). Ethical obligations-or perhaps more likely, the specter of malpractice liability-thus require a lawyer to bring all reasonably related, viable claims in a single action. But the three-judge panel's "mutually exclusive"

rule raises the possibility that some fraction (perhaps a substantial one) of these reasonably related, ethically compelled claims, which a lawyer must research and litigate, will be excluded from a fee award.

Dr. Ibrahim's lawyers may have violated their ethical duties and risked malpractice if they had failed to bring all claims that their client could present in good faith. See Model Rules of Prof'l Conduct r. 1.3 cmt. (Am. Bar Ass'n 2016) ("A lawyer should pursue a matter on behalf of a client despite opposition, obstruction or personal inconvenience to the lawyer, and take whatever lawful and ethical measures are required to vindicate a client's cause or endeavor."). Dr. Ibrahim and her lawyers faced an uphill battle. The government vigorously defended this case, and Dr. Ibrahim did not have access to meaningful discovery until a few months before trial, after years of litigation and two appeals-she was fighting blind against the Many-Faced Bureaucratic God. And as demonstrated by the complex and longstanding procedural history, it was not even clear that Dr. Ibrahim could advance the case beyond the dismissal stage.

Applying the correct "common course of conduct" test to Dr. Ibrahim's claims for procedural and substantive due process, violations of her First Amendment and equal protection rights and the APA, we conclude that Dr. Ibrahim meets the first prong of Hensley . All of Dr. Ibrahim's claims arose from her wrongful placement on the No Fly list, and are therefore related. Fees for each of these claims are thus recoverable. All of these claims derive from the government's interest in Dr. Ibrahim's activities, which led to her placement on the No Fly list, her placement on and off various other watchlists (which the district court deemed "Kafkaesque"), her attempts to learn why she was on the No Fly list, her attempts to get herself removed from the No Fly list, and the government's intransigence in setting the record straight for almost a decade. As the district court found, this treatment had a "palpable impact, leading to the humiliation, cuffing, and incarceration of an innocent and incapacitated air traveler." Dr. Ibrahim's "litany of troubles" flow directly from her erroneous placement on the No Fly list, as do all of the claims that went to trial. None of the claims was distinct or separable from another, and each claim sought the same relief Dr. Ibrahim ultimately obtained.

3. Level of Success

Dr. Ibrahim also satisfied Hensley 's second prong because she "achieved a level of success that makes the hours reasonably expended a satisfactory basis for making a fee award." Sorenson , 239 F.3d at 1147 (internal punctuation omitted) (quoting Hensley , 461 U.S. at 434, 103 S.Ct. 1933 ). The district court found that Dr. Ibrahim had only "limited" success. We disagree.

The achievement of Dr. Ibrahim and her attorneys in successfully challenging her No Fly list placement and forcing the government to fix its error was not just "excellent," but extraordinary. Hensley , 461 U.S. at 435, 103 S.Ct. 1933. Although this is not a class action, and thus we assess Dr. Ibrahim's individual success, the pathbreaking nature of her lawsuit underscores her achievement. Dr. Ibrahim was the first person ever to force the government to admit a terrorist watchlisting mistake; to obtain significant discovery regarding how the federal watchlisting system works; to proceed to trial regarding a watchlisting mistake; to force the government to trace and correct all erroneous records in its customer watchlists and databases; to require the government to inform a watchlisted individual of her TSDB status; and to admit that it has secret exceptions to the watchlisting reasonable suspicion standard. Dr. Ibrahim, in her first appeal to our court, established that district courts have jurisdiction over challenges to placement on terrorist watchlists, including the No Fly list. Ibrahim I , 538 F.3d at 1254-57. In her second appeal, she established that even aliens who voluntarily depart from the U.S. have standing to bring constitutional claims when they have had a significant voluntary connection with the U.S. Ibrahim II , 669 F.3d at 993-94. Moreover, on her journey, Dr. Ibrahim established important principles of law, benefiting future individuals wrongfully placed on government watchlists. Previously, most such challenges failed at the pleading stage. See, e.g. , Shearson v. Holder , 725 F.3d 588 (6th Cir. 2013) ; Rahman v. Chertoff , No. 05 C 3761, 2010 WL 1335434 (N.D. Ill. Mar. 31, 2010) ; Scherfen v. U.S. Dep't of Homeland Sec. , No. 3:CV-08-1554, 2010 WL 456784 (M.D. Penn. Feb. 2, 2010) ; Green v. Transp. Sec. Admin. , 351 F.Supp.2d 1119 (W.D. Wash. 2005).

Dr. Ibrahim's victory affected more than just her case-it affected the way all individuals can contest their placement on these watchlists. The EAJA

rests on the premise that a party who chooses to litigate an issue against the Government is not only representing his or her own vested interest but is also refining and formulating public policy. An adjudication or civil action provides a concrete, adversarial test of Government regulation and thereby insures the legitimacy and fairness of the law.

Escobar Ruiz v. I.N.S. , 813 F.2d 283, 288 (9th Cir. 1987) (quoting H.R. Rep. No. 1418, at 10 (1980) ). Dr. Ibrahim refined federal watchlisting policy by creating a roadmap for other similarly situated plaintiffs to seek judicial redress for alleged wrongful placement on government watchlists.

The significance of Dr. Ibrahim's roadmap cannot be overstated. Any person could have the misfortune of being mistakenly placed on a government watchlist, and the consequences are severe. Placement on the No Fly list, if left unchanged, prevents an individual from ever boarding an airplane that touches the vast expanse of U.S. airspace. Travel by air has become a normal part of our lives, whether for work, vacations, funerals, weddings, or to visit friends and family. In 2017 alone, there were 728 million airline passengers in the United States. It is debilitating to lose the option to fly to one's intended destination. Today, those misplaced on the No Fly list can contest that placement, and, if misplaced, regain their right to flight. See Saenz v. Roe , 526 U.S. 489, 498, 119 S.Ct. 1518, 143 L.Ed.2d 689 (1999) ("[T]he 'constitutional right to travel from one State to another' is firmly embedded in our jurisprudence." (quoting United States v. Guest , 383 U.S. 745, 757, 86 S.Ct. 1170, 16 L.Ed.2d 239 (1966) ) ).

A full award of attorneys' fees here is consistent with the EAJA's goal of creating a level playing field in cases in which there is an imbalance of power and resources. "The EAJA grew out of a concern for the unequal position of the individual vis à vis an insensitive and ever-expanding governmental bureaucracy. The House Report expresses concern about the fact that ... the government with its greater resources and expertise can in effect coerce compliance with its position." Escobar Ruiz , 813 F.2d at 288 (internal quotation marks and citation omitted). Dr. Ibrahim-a professor and person of ordinary means-did not have the resources to pay an attorney to pursue her claims, which ultimately cost more than $3.6 million dollars to litigate. And the small seventeen-lawyer law firm that represented her, McManis Faulkner, had similarly limited resources, but, when others refused, they agreed to take on her case, uncertain whether they would ever be compensated. On the other side of the table was the government and its virtually unlimited resources. The government had a team of twenty-six lawyers-more lawyers than McManis Faulkner employed-and spent at least 13,400 hours-in other words, 558 days of one person working 24 hours a day-vigorously defending this litigation.

Accordingly, we find that Dr. Ibrahim achieved excellent results and is therefore entitled to reasonable fees consistent with that outcome.

C. Bad Faith

Generally, attorneys' fees are capped under the EAJA at $125 per hour. 28 U.S.C. § 2412(d)(2)(A)(ii). The EAJA provides, however, that "[t]he United States shall be liable for such fees and expenses to the same extent that any other party would be liable under the common law." 28 U.S.C. § 2412(b). Thus, under the common law a court may assess attorneys' fees against the government if it has "acted in bad faith, vexatiously, wantonly, or for oppressive reasons." Rodriguez v. United States , 542 F.3d 704, 709 (9th Cir. 2008) (quoting Chambers v. NASCO, Inc. , 501 U.S. 32, 45-46, 111 S.Ct. 2123, 115 L.Ed.2d 27 (1991) ). "[W]e hold the government to the same standard of good faith that we demand of all non-governmental parties." Id. The purpose of such an award is to "deter abusive litigation in the future, thereby avoiding harassment and protecting the integrity of the judicial process." Copeland v. Martinez , 603 F.2d 981, 984 (D.C. Cir. 1979). "The district court may award attorney fees at market rates for the entire course of litigation, including time spent preparing, defending, and appealing the two awards of attorney fees, if it finds that the fees incurred during the various phases of litigation are in some way traceable to the [government's] bad faith." Brown v. Sullivan , 916 F.2d 492, 497 (9th Cir. 1990). And in evaluating whether the government acted in bad faith, we may examine the government's actions that precipitated the litigation, as well as the litigation itself. Rawlings v. Heckler , 725 F.2d 1192, 1195-96 (9th Cir. 1984) ; see also Hall v. Cole , 412 U.S. 1, 15, 93 S.Ct. 1943, 36 L.Ed.2d 702 (1973) (concluding that "the dilatory action of the union and its officers" in expelling an individual from the union following his resolutions unsuccessfully condemning union management's alleged undemocratic and short sighted policies constituted bad faith (internal quotation marks and citation omitted) ); Dogherra v. Safeway Stores, Inc. , 679 F.2d 1293, 1298 (9th Cir. 1982) (concluding that an employer would have acted in bad faith if it pursued a defense of an action based on a lie).

"A finding of bad faith is warranted where an attorney knowingly or recklessly raises a frivolous argument, or argues a meritorious claim for the purpose of harassing an opponent." Primus Auto. Fin. Servs., Inc. v. Batarse , 115 F.3d 644, 649 (9th Cir. 1997) (internal quotation marks and citation omitted). "Mere recklessness does not alone constitute bad faith; rather, an award of attorney's fees is justified when reckless conduct is combined with an additional factor such as frivolousness, harassment, or an improper purpose." Rodriguez , 542 F.3d at 709 (internal quotation marks omitted) (quoting Fink v. Gomez , 239 F.3d 989, 993-94 (9th Cir. 2001) ). It is also shown when litigants disregard the judicial process. Brown , 916 F.2d at 496 (concluding that the "cumulative effect" of the Appeals Council's review of a claim for social security benefits, including the "failure to review a tape of an ALJ's hearing, a statutory duty, and other acts that caused delay and necessitated the filing and hearing of additional motions, viz. , the Secretary's delay in producing documents and in transcribing the tape" constituted bad faith); see also Octane Fitness, LLC v. ICON Health & Fitness, Inc. , 572 U.S. 545, 134 S.Ct. 1749, 1758, 188 L.Ed.2d 816 (2014) (allowing fee-shifting for willful disobedience of a court's order); Beaudry Motor Co. v. Abko Props., Inc. , 780 F.2d 751, 756 (9th Cir. 1986) (bringing a case barred by the statute of limitations); Toombs v. Leone , 777 F.2d 465, 471-72 (9th Cir. 1985) (deliberately failing to comply with local rules regarding exchange of exhibits); Int'l Union of Petroleum & Indus. Workers v. W. Indus. Maint., Inc. , 707 F.2d 425, 428-29 (9th Cir. 1983) (refusing to abide by arbitrator's award).

Though the district court cited some of this relevant case law, including Rodriguez , Chambers , and Brown , it erroneously applied a piecemeal approach to its bad faith determination in conflict with the cases it cited. See Rodriguez , 542 F.3d at 712. We have long established that to make a bad faith determination, we must review the totality of the government's conduct. See Brown , 916 F.2d at 496 ; see also Rawlings , 725 F.2d at 1196. However, "it is unnecessary to find that every aspect of a case is litigated by a party in bad faith in order to find bad faith by that party." Rodriguez , 542 F.3d at 712.

The district court clearly erred by failing to consider the totality of the government's conduct, particularly its comportment after discovering Agent Kelley's error. See Mendenhall v. Nat'l Transp. Safety Bd. , 92 F.3d 871 (9th Cir. 1996). In Mendenhall , we held that a government agency, there the FAA, acted in bad faith, thereby allowing the prevailing party, Mendenhall, to recover fees at a reasonable market rate. We held that "[t]he moment the FAA acknowledged" that its complaint against her was baseless, "the agency was no longer justified in pursuing its action." Id. at 877. "The agency's continuation of an action it knew to be baseless ... is a prime example of bad faith." Id. (internal quotation marks omitted) (quoting Brown , 916 F.2d at 495-96 ).

The only post-litigation agency conduct that the district court considered was whether the government obstructed Dr. Ibrahim or her daughter, Raihan, from appearing at trial. The court unreasonably concluded, at least with respect to Raihan, that there was no evidence that the government did so. That conclusion by the district court is "without support in inferences that may be drawn from the facts in the record" and is thus clearly erroneous. Crittenden v. Chappell , 804 F.3d 998, 1012 (9th Cir. 2015). Dr. Ibrahim's daughter, a U.S. citizen with a U.S. passport, was flagged by the National Targeting Center (NTC) as potentially inadmissible to the United States. NTC determined that she had been listed in the TSDB database by other government entities as an individual about whom those agencies possessed "substantive 'derogatory' information" that "may be relevant to an admissibility determination under the Immigration and Nationality Act." But, as a U.S. citizen, Dr. Ibrahim's daughter clearly was not subject to the INA.

Although Dr. Ibrahim's daughter carried a U.S. passport and U.S. Customs and Border Protection recognized that she appeared to be a U.S. citizen, NTC requested that Philippine Airlines perform additional screening of her in the following e-mail:

[Subject line:] POSSIBLE NO BOARD REQUESTPNR WNDYJS
[Body:] NOTICE TO AIR CARRIER The [DHS and U.S. Customs and Border Protection] recommends the airline to contact [the carrier liaison group] when the following passenger shows up to check in ....

After Philippine Airlines received this notice, Raihan was not permitted to board her flight, causing her to miss her mother's trial, where she had been listed as a witness. The government did not update the TSDB to reflect that Dr. Ibrahim's daughter was a U.S. citizen until after it had purportedly investigated the situation.

The district court also disregarded the government's response to Agent Kelley's error once the error was discovered. On remand, the district court should take into account in its analysis of bad faith the government's conduct together with the consequences Dr. Ibrahim suffered as a result. For example, the district court failed to consider the February 2006 order to remove Dr. Ibrahim from all watchlist databases because she had "no nexus to terrorism." Despite this order, the government continued to place Dr. Ibrahim on and off federal watchlists, providing no reasonable explanation for Dr. Ibrahim's never-ending transitions in watchlist status. Further, the only justification for her continued watchlist placement is claimed to be a state secret. This assertion begs the question: Why was Dr. Ibrahim added to any watchlist once the government determined she was not a threat? Moreover, was there any justification for her seemingly random addition to and removal from watchlists? The district court should also consider the government's failure to remedy its own error until being ordered to do so and its failure to inform Agent Kelley of his mistake for eight years.

The district court also wrongly rejected as a basis for bad faith the government's numerous requests for dismissal on standing grounds post- Ibrahim II , where we determined unequivocally that Dr. Ibrahim had Article III standing even though she voluntarily left the United States. The government knowingly pursued baseless standing arguments in its third motion to dismiss, its motion for summary judgment, statements during trial, and post-trial proposed findings of fact and conclusions of law. The district court found that the government's position was "unreasonable," particularly after it "continue[d] to seek dismissal based on lack of standing in the face of our court of appeal's decision," but it did not account for this unreasonableness in its bad faith determination. See Ibrahim II , 669 F.3d at 997. This was contrary to our longstanding precedent that when an attorney knowingly or recklessly raises frivolous arguments, a finding of bad faith is warranted. Fink , 239 F.3d at 993-94 ; see also Optyl Eyewear Fashion Int'l Corp. v. Style Cos. , 760 F.2d 1045, 1052 (9th Cir. 1985). As the district court acknowledged, "the government should have sought review by the United States Supreme Court," rather than to repeatedly assert an argument for dismissal it knew to be baseless.

Although the district court concluded that "the government was wrong to assure all that it would not rely on state-secrets evidence and then reverse course and seek dismissal at summary judgment," it incorrectly found that the error was not knowingly or recklessly made. The government falsely represented to both the district court and to Dr. Ibrahim's counsel-orally in court and in written filings-that it would not rely on evidence withheld on the basis of a privilege to "prevail in this action." And yet, after these representations, the government raised the very argument it had promised to forego. This is precisely the type of "abusive litigation" disavowed in the EAJA, which is focused on "protecting the integrity of the judicial process." Copeland , 603 F.2d at 984 (concluding that the government was entitled to bad faith fees where the plaintiff brought a frivolous suit under Title VII of the Civil Rights Act of 1964 because the purpose of a fee award under the bad faith exception includes "protecting the integrity of the judicial process").

The district court also clearly erred in concluding the government's privilege assertions were made in good faith by considering only the merits of the privilege arguments themselves ("some were upheld, some were overruled"). The district court disregarded the government's stubborn refusal to produce discovery even after the district court ordered it produced. But "willful disobedience of a court order" supports a bad faith finding. Octane Fitness, LLC , 134 S.Ct. at 1758 (citation omitted); see also Hutto v. Finney , 437 U.S. 678, 689 n.14, 98 S.Ct. 2565, 57 L.Ed.2d 522 (1978) (noting that a court can "award attorney's fees against a party who shows bad faith by delaying or disrupting the litigation or by hampering enforcement of a court order"). Here, the government refused to produce evidence designated "sensitive security information" (SSI), even after Dr. Ibrahim's attorneys obtained the requisite security clearance and the court ordered the government to produce discovery. Contrary to its April 2014 bad faith finding, the district court itself, in a December 20, 2012 order, admonished the government for its "persistent and stubborn refusal to follow the statute" that required the government to produce this information in these circumstances.

The district court's 2012 reprimand had little effect on the government's conduct. After this order, the government continued to drag its feet and refused to produce any privileged information-which Dr. Ibrahim's attorneys were cleared to review-because it wanted to renegotiate an already-in-place protective order. The district court, noting its dissatisfaction with the government's handling of this litigation in 2013, emphasized that the government had "once again miss[ed] a deadline to produce materials in this long-pending action."

The government also refused to comply with the district court's order to produce Dr. Ibrahim's current watchlist status until it was compelled to do so. Dr. Ibrahim should not have been required to pursue a motion to compel to require the government to produce this information, especially when the government's justifications for refusing to produce it were baseless. The government first argued that Dr. Ibrahim did not have standing to assert a right to learn the status of her No Fly list placement-a meritless reassertion of a settled issue. The government alternatively argued that her historical watchlist status was irrelevant to this case-a plainly frivolous contention given that Dr. Ibrahim's watchlist status is at the heart of this dispute. These actions, too, support a bad faith finding.

On remand, when analyzing the government's litigation conduct through a totality of the circumstances lens, the district court must also consider other relevant conduct, including the government's abuse of the discovery process; interference with the public's right of access to trial by making at least ten motions to close the courtroom, see Foltz v. State Farm Mut. Auto. Ins. Co. , 331 F.3d 1122, 1135 (9th Cir. 2003) ; accord Globe Newspaper Co. v. Superior Court , 457 U.S. 596, 606-07, 102 S.Ct. 2613, 73 L.Ed.2d 248 (1982) ; and misuse of a summary judgment hearing to discuss tangential issues unrelated to the merits of the summary judgment motion.

Finally, the district court erred in failing to consider whether the government's position as a whole was in good faith. Though the government may have had a legitimate basis to defend this litigation initially, whether the government's defense of this litigation was ever in good faith is a different question from whether it was always in good faith. Once the government discovers that its litigation position is baseless, it may not continue to defend it. Mendenhall , 92 F.3d at 877. On remand, the district court must consider whether the government had a good faith basis to defend its No Fly list error as the litigation evolved.

In sum, the district court's ruling that the government did not act in bad faith was in error because it was incomplete. The district court focused primarily upon Agent Kelley's "unknowing" placement of Dr. Ibrahim's name on the No Fly list, which it deemed "the original sin," rather than considering the "totality" of the government's conduct, "including conduct 'prelitigation and during trial.' " Rodriguez , 542 F.3d at 712 (emphasis removed) (citations omitted); see also Rawlings , 725 F.2d at 1196 (opining that when evaluating bad faith we must consider the "totality of the circumstances"). And this conduct should have included both an analysis of the government agencies' and its legal representatives' conduct. Dr. Ibrahim should not have had to endure over a decade of contentious litigation, two trips to the court of appeals, extensive discovery, over 800 docket entries amounting to many thousands of pages of record, and a weeklong trial the government precluded her (and her U.S.-citizen daughter) from attending, only to come full circle to the government's concession that she never belonged on the No Fly list at all-that she is not and never was a terrorist or threat to airline passenger or civil aviation security. It should not have taken a court order to require the government to "cleans[e] and/or correct[ ] ... the mistaken 2004 derogatory designation" of Dr. Ibrahim, which had spread like an insidious virus through numerous government watchlists.

V.

The district court's piecemeal award of attorneys' fees in this case runs afoul of the Supreme Court's admonition that "[a] request for attorney's fees should not result in a second major litigation." Hensley , 461 U.S. at 437, 103 S.Ct. 1933. In this request for attorneys' fees alone, three courts, both a three-judge panel of our court and an en banc panel, fifteen judges, and one special master have had to consider the merits of this claim while the attorneys' fees and costs continue to mount. The district court and original panel's substantive determination of issues are precisely the type of "second major litigation" that the Hensley Court directed us to avoid.

That is not to say that all of the special master's findings and recommended fee reductions accepted by the district court were incorrect. As the Supreme Court noted in Hensley , consideration of the twelve factors laid out in Johnson v. Georgia Highway Express, Inc. , 488 F.2d 714, 717-19 (5th Cir. 1974), abrogated on different grounds by Blanchard v. Bergeron , 489 U.S. 87, 109 S.Ct. 939, 103 L.Ed.2d 67 (1989), was entirely appropriate. 461 U.S. at 429-30, 103 S.Ct. 1933. For example, the special master did not err in considering whether there was duplicative or block billing. However, when revisiting this case, the fee reductions should not be so pervasive that they completely eliminate the reasonable fees to which Dr. Ibrahim's attorneys are entitled.

When the district court recalculates these fees, the calculation should acknowledge that Dr. Ibrahim and her lawyers, facing overwhelming odds, won a groundbreaking victory, and that they are entitled to the fees they've earned and the vast majority of fees they requested. Cf. Moreno v. City of Sacramento , 534 F.3d 1106, 1115 (9th Cir. 2008) ("The district court's inquiry must be limited to determining whether the fees requested by this particular legal team are justified for the particular work performed and the results achieved in this particular case.").

We therefore REVERSE , VACATE the award of attorneys' fees, and REMAND to allow the district court to make a bad faith determination under the correct legal standard in the first instance, and to re-determine the fee award in accordance with this opinion.

APPENDIX A

Glossary of Acronyms APA Administrative Procedure Act CLASS Consular Lookout and Support System DHS Department of Homeland Security EAJA Equal Access to Justice Act FAA Federal Aviation Administration FBI Federal Bureau of Investigation HSPD-6 Homeland Security Presidential Directive 6 IBIS Interagency Border Inspection System INA Immigration and Nationality Act KSTF Known and Suspected Terrorist File NCIC National Crime Information Center NCTC National Counterterrorism Center NTC National Targeting Center PIVF Passenger Identity Verification Form SFO San Francisco International Airport SSI Sensitive Security Information TACTICS Tipoff Australia Counterterrorism Information Control System TIDE Terrorist Identities Datamart Environment TRIP Travel Redress Inquiry Program TSA Transportation Security Administration TSC Terrorist Screening Center TSDB Terrorist Screening Database TUSCAN Tipoff United States-Canada VGTO Violent Gang and Terrorist Organization VGTOF Violent Gang and Terrorist Organization File

CALLAHAN, Circuit Judge, joined by N.R. SMITH and NGUYEN, Circuit Judges, concurring in part and dissenting in part:

I agree with the majority that Dr. Ibrahim is the prevailing party in this case and that the test for substantial justification is an inclusive one: whether the government's position as a whole has a reasonable basis in fact and law. I further agree that Dr. Ibrahim's equal protection and First Amendment claims are sufficiently related to her other claims such that the district court's failure to reach those issues does not justify the district court's curtailment of attorneys' fees. But the majority exceeds our role as an appellate court by determining in the first instance that the government's position was not substantially justified. Supreme Court precedent requires that we allow the district court to make that determination on remand. See Pierce v. Underwood , 487 U.S. 552, 560, 108 S.Ct. 2541, 101 L.Ed.2d 490 (1988). I also dissent from the majority's setting aside of the district court's finding that the defendants did not proceed in bad faith. Applying the applicable standard of review, see Rodriguez v. United States , 542 F.3d 704, 709 (9th Cir. 2008), Dr. Ibrahim has not shown that the district court committed clear error. Accordingly, I would affirm the district court's limitation of Dr. Ibrahim's attorneys' fees to the statutory rate of $125 per hour set by Equal Access to Justice Act (EAJA), 28 U.S.C. § 2412.

I

Although I agree that substantial justification requires a single-finding, the majority errs in proceeding to make this factual determination. In Pierce , the Supreme Court held that the language in 28 U.S.C. § 2412(d)(1)(A) -that attorneys' fees shall be awarded "unless the court finds that the position of the United States was substantially justified"-contemplates that "the determination is for the district court to make and suggests some deference to the district court." 487 U.S. at 559, 108 S.Ct. 2541. The Court explained why the district court is in a better position than an appellate court to make this determination:

To begin with, some of the elements that bear upon whether the Government's position "was substantially justified" may be known only to the district court. Not infrequently, the question will turn upon not merely what was the law, but what was the evidence regarding the facts. By reason of settlement conferences and other pretrial activities, the district court may have insights not conveyed by the record, into such matters as whether particular evidence was worthy of being relied upon, or whether critical facts could easily have been verified by the Government. Moreover, even where the district judge's full knowledge of the factual setting can be acquired by the appellate court, that acquisition will often come at unusual expense, requiring the court to undertake the unaccustomed task of reviewing the entire record, not just to determine whether there existed the usual minimum support for the merits determination made by the factfinder below, but to determine whether urging of the opposite merits determination was substantially justified.

Id . at 560, 108 S.Ct. 2541 (emphasis in original). The EAJA is materially indistinguishable from the statute at issue in Pierce , and our case presents just the type of situation alluded to by the Supreme Court. The district court has managed this litigation for twelve years. It is uniquely positioned to determine based on the totality of the circumstances whether the government's position was substantially justified.

Despite its ultimate factual conclusion that "neither the agencies' conduct nor the government's litigation position was substantially justified" (Maj. Opn. at 1172), the majority's own description of the litigation shows why the district court should decide the issue in the first instance. The majority "ascribe[s] no nefarious motivations to the government" (Maj. Opn. at 1170 n.19) and declines to find that "the government's defense of this litigation was unreasonable at all points of the litigation." Maj. Opn. at 1171 n.20. Later in its opinion, the majority notes that "[t]hough the government may have had a legitimate basis to defend this litigation initially, whether the government's defense of this litigation was ever in good faith is a different question from whether it was always in good faith." Maj. Opn. at 1184. The majority's recognition of the complexities of this litigation illustrates precisely why the issue should be decided in the first instance by the district court.

As the Supreme Court directed in Pierce , our iteration of the single-finding requirement compels a remand to the district court to make that finding in the first place. See Adarand Constructors, Inc. v. Pena , 515 U.S. 200, 237, 115 S.Ct. 2097, 132 L.Ed.2d 158 (1995) ("Because our decision today alters the playing field in some important respects, we think it best to remand the case to the lower courts for further consideration in light of the principles we have announced."). The government would then have the opportunity to explain its reasons for its positions and offer evidence in support of its positions, and, of course, Dr. Ibrahim would be entitled to respond to the government's arguments and evidence. See Fisher v. Univ.of Texas at Austin , 570 U.S. 297, 314, 133 S.Ct. 2411, 186 L.Ed.2d 474 (2013) (noting that "fairness to the litigants and the courts that heard the case requires that it be remanded so that the admissions process can be considered and judged under a correct analysis"). The district court would then make its independent determination, which we could then review should either side take exception. We are not a fact-finding court, and our feelings concerning the reasonableness of the government's overall litigation strategy do not justify our expropriation of the district court's responsibility to make such a determination in the first instance.

II

Although the majority correctly notes that a finding of bad faith permits a market-rate recovery of attorneys' fees, in reversing the district court's finding of no bad faith, the majority fails to apply, let alone acknowledge, the proper standard of review. "We review a district court's finding regarding a party's bad faith for clear error." Rodriguez , 542 F.3d at 709. "A finding is clearly erroneous if it is (1) illogical, (2) implausible, or (3) without support in inferences that may be drawn from the facts in the record." Crittenden v. Chappell , 804 F.3d 998, 1012 (9th Cir. 2015) (internal quotation marks omitted) (quoting United States v. Hinkson , 585 F.3d 1247, 1262 (9th Cir. 2009) (en banc) ). The Supreme Court has cautioned that pursuant to Federal Rule of Civil Procedure 52, "[f]indings of fact shall not be set aside unless clearly erroneous, and due regard shall be given to the opportunity of the trial court to judge the credibility of the witnesses."

Anderson , 470 U.S. at 573, 105 S.Ct. 1504. The Supreme Court has counseled:

If the district court's account of the evidence is plausible in light of the record viewed in its entirety, the court of appeals may not reverse it even though convinced that had it been sitting as the trier of fact, it would have weighed the evidence differently. Where there are two permissible views of the evidence, the factfinder's choice between them cannot be clearly erroneous.

Id . at 573-74, 105 S.Ct. 1504.

The majority turns the standard of review on its head by analyzing and emphasizing the pieces of evidence that it concludes "support a bad faith finding." Maj. Opn. at 1183-84; see generally Maj. Opn. at 1181-86. But to reverse for clear error, we should consider whether the district court's finding was plausible and not simply identify evidence that arguably supports a conclusion contrary to the district court's determination.

None of the arguments proffered by Dr. Ibrahim support a finding of clear error. She first argues that there is bad faith because she was wrongly placed on the watchlist, the government refused to acknowledge this fact, and the government continued to oppose her even after it knew its conduct was wrong. But this argument fails to acknowledge the evolution of the law-which has been prompted, at least in part, by this litigation. We now know that Dr. Ibrahim was placed on the watchlist by the mistake of a single federal employee. Moreover, at the time Dr. Ibrahim was placed on the government's watchlist, there was no uniform standard. Also, as the three-judge panel observed, "[p]rior to this suit no court had held a foreign national such as Ibrahim possessed any right to challenge their placement-mistaken or not-on the government's terrorism watchlists." Ibrahim v. U.S. Dep't. of Homeland Sec. , 835 F.3d 1048, 1058 (9th Cir. 2016) ( Ibrahim III ), reh'g en banc granted , 878 F.3d 703 (9th Cir. 2017). Thus, it was not necessarily bad faith for the government to assert that Dr. Ibrahim did not possess such a right. Id . Furthermore, it appears that the government removed Dr. Ibrahim from the No-Fly List more than a year prior to Dr. Ibrahim filing this action in 2016. Id .

Second, Dr. Ibrahim asserts that the government's raising of its standing defense after Ibrahim v. Dep't. of Homeland Security , 669 F.3d 983 (9th Cir. 2012) ( Ibrahim II ), demonstrates bad faith. However, the three-judge panel noted:

Ibrahim fails to point to any evidence indicating the government reraised standing as a defense at summary judgment and trial with vexatious purpose. What's more, the government correctly points out that there was at minimum a colorable argument that the different procedural phases of the case rendered their subsequent standing motions nonfrivolous.

Ibrahim III , 835 F.3d at 1059. Although we held that Dr. Ibrahim had standing in Ibrahim II , 669 F.3d at 992-94, this did not preclude the government from seeking to preserve the issue or from challenging her underlying constitutional claims. See Ibrahim II , 669 F.3d at 997 (noting that we expressed "no opinion on the validity of the underlying constitutional claims").

Third, Dr. Ibrahim's claim that the government's privilege assertions were made in bad faith is not compelling as the government was successful on many of its privilege assertions. See Ibrahim III , 835 F.3d at 1059.

Fourth, the three-judge panel noted:

Nor is there any evidence in the record demonstrating the government prevented Ibrahim from entering the United States to offer testimony in this suit, and with respect to her daughter, Ibrahim fails to explain why there was any error in the district court's determination that the government's initial refusal to allow her into the country was anything but a mistake, and a quickly corrected one at that.

Id . at 1060. The majority, however, asserts that it was unreasonable for the district court to conclude that "there was no evidence that the government" obstructed Dr. Ibrahim's daughter from appearing at trial. Maj. Opn. at 1181. But the question is not whether there is evidence that the government interfered with the daughter's travel to the United States, but whether it did so in bad faith. The majority notes that as a citizen the daughter "was not subject to the INA," (Maj. Opn. at 1182), but the No-Fly List and other travel restrictions are applicable to citizens as well as others.

Finally, I agree with the three-judge panel that:

Ibrahim's argument that the district court erred by making piecemeal bad faith determinations is unpersuasive. Her sole authority on point is our decision in McQuiston v. Marsh , 707 F.2d 1082, 1086 (9th Cir. 1983), superseded by statute as recognized by Melkonyan v. Sullivan , 501 U.S. 89, 96, 111 S.Ct. 2157, 115 L.Ed.2d 78 (1991), where we made the unremarkable observation that "[b]ad faith may be found either in the action that led to the lawsuit or in the conduct of the litigation." She fails, however, to point to any case where we have elevated that observation to edict. Rather, we have consistently required fee awards based on bad faith to be "traceable" to the conduct in question. See, e.g., Rodriguez , 542 F.3d at 713. It was therefore proper for the district court to consider each claimed instance of bad faith in order to determine whether the associated fees should be subject to a market-rate increase.

Ibrahim III , 835 F.3d at 1060.

Of course, we as an en banc panel are free to disagree with the conclusions drawn by the three-judge panel, but where, as here, the standard of review is clear error, the fact that several appellate judges agreed with the district court is some evidence that the district court's decision was not clear error.

Although the majority remanded the issue of bad faith to the district court for its independent re-assessment of the issue, as an appellate court we should allow the district court's determination of no bad faith to stand unless appellant shows clear error. Anderson , 470 U.S. at 572, 105 S.Ct. 1504 ; Rodriguez , 542 F.3d at 709. Because Dr. Ibrahim has not shown clear error, the district court's finding of no bad faith should be affirmed.

III

The majority, having determined that the test for substantial justification under the EAJA is an inclusive one-whether the government's position as a whole has a reasonable basis in fact and law-gets carried away and arrogates to itself the determination in the first instance that the government's position was not reasonable. However, the Supreme Court has clearly directed that such a determination should be made by the district court, Pierce , 487 U.S. at 560, 108 S.Ct. 2541, where the parties will have an opportunity to present argument and evidence applying our substantial justification test to the particularities of this litigation. See Fisher , 570 U.S. at 314, 133 S.Ct. 2411. And while the majority, by remanding the bad faith issue to the district court, resisted the temptation to decide itself whether the government has proceeded in bad faith, it should have recognized that there was no need for a remand because Dr. Ibrahim failed to show clear error in the district court's holding that the government did not proceed in bad faith. See Rodriguez , 542 F.3d at 709. Accordingly, I agree with the majority's test for substantial justification, but I dissent from its factual determination in the first instance that the government's litigation position was not justified and from its disturbance of the district court's finding that the government did not proceed in bad faith. 
      
      For ease of reading, attached as Appendix A is a glossary of the numerous acronyms referenced throughout this opinion.
     
      
      This avenue of redress was replaced in 2007 by the Travel Redress Inquiry Program (TRIP), see 49 U.S.C. § 44926(a), which requires a "timely and fair" process for persons wrongly delayed or prohibited from boarding a commercial aircraft.
     
      
      To this date, we do not know how Dr. Ibrahim was initially flagged for potential placement in the TSDB, managed by the Terrorist Screening Center (TSC), of which the No Fly list is a subset. There has never been a determination, nor can we determine, whether this placement was motivated by "race, religion, or ethnicity."
     
      
      None of the following information was deemed classified or otherwise privileged before or during trial.
     
      
      This is information derived solely from the record before us, so we do not represent that this is an exclusive list or that there have not been subsequent changes to the lists.
     
      
      Again, we do not know on this record the motivation for singling out Dr. Ibrahim for the interview, but we note that the district court stated "it [was] plausible that Dr. Ibrahim was interviewed in the first place on account of her roots and religion." The interview also came soon on the heels of her Muslim husband's visit. However, the motivation question was the basis for one of the claims the district court found it unnecessary to reach.
     
      
      Dr. Ibrahim was a member of a non-terrorist organization with a similar-sounding name, Jemaah Islah Malaysia, a Malaysian professional organization composed primarily of individuals who studied in the United States or Europe. The district court declined to find that Agent Kelley confused Jemaah Islah Malaysia with Jemaah Islamiyah.
     
      
      The record does not reflect how Canada and Australia use the information exported into the TUSCAN and TACTICS databases. The government declined to provide this information during discovery, deeming it outside the scope of the Federal Rule of Civil Procedure 30(b)(6) subpoena.
     
      
      We held that although the TSA employee "lives in Virginia and has no ties to California," the court had specific jurisdiction over Dr. Ibrahim's claims against him because "(1) [he] purposefully directed his action (namely, his order to detain Ibrahim) at California; (2) [Dr.] Ibrahim's claim arises out of that action; and (3) jurisdiction is reasonable." Ibrahim I , 538 F.3d at 1258 (citation omitted).
     
      
      The government designated all of its interrogatory responses "attorneys' eyes only," which, under the protective order, meant that only Dr. Ibrahim's attorneys were allowed to review information produced with this stamp, and Dr. Ibrahim herself was not permitted to review those documents. As a result, it is difficult to discern precisely when Dr. Ibrahim herself was able to learn certain information. However, with respect to information regarding her current and historical watchlist statuses, the district court concluded those were not protected by privilege in its April 2013 order, so it is likely counsel was able to inform Dr. Ibrahim of her watchlist statuses the day the interrogatory responses were filed.
     
      
      Dr. Ibrahim first learned that Agent Kelley had participated in the 2004 interview and that Kelley was personally responsible for nominating her to the TSDB during the deposition of the Acting Deputy Director of the TSC on May 29, 2013.
     
      
      Analyzing claims under the Reynolds privilege involves three steps:
      First, we must "ascertain that the procedural requirements for invoking the state secrets privilege have been satisfied." Second, we must make an independent determination whether the information is privileged .... Finally, "the ultimate question to be resolved is how the matter should proceed in light of the successful privilege claim."
      Al-Haramain Islamic Found., Inc. v. Bush , 507 F.3d 1190, 1202 (9th Cir. 2007) (citations omitted) (quoting El-Masri v. United States , 479 F.3d 296, 304 (4th Cir. 2007) ).
     
      
      The district court allowed a rate enhancement for James McManis because of his "distinctive knowledge and skills."
     
      
      Before the district court, the government opposed Dr. Ibrahim's request for attorneys' fees on substantial justification grounds, and it originally cross-appealed the entire award in this appeal. Before argument, however, the government moved to voluntarily dismiss the cross-appeal and paid to Dr. Ibrahim the now uncontested amounts of attorneys' fees and expenses awarded by the district court.
     
      
      The partial dissent is incorrect to view the issue as solely a factual one, as we must consider the law as applied to the facts.
     
      
      All but two circuits agree that "the EAJA-like other fee-shifting statutes-favors treating a case as an inclusive whole, rather than as atomized line-items." See Glenn v. Comm'r of Soc. Sec. , 763 F.3d 494, 498-99 (6th Cir. 2014) (adopting a single inquiry test and noting that district courts cannot simply compare the number of successful claims to the number of unsuccessful claims in a single appeal) ("Rather, the question is whether the government's litigating position ... is justified to a degree that could satisfy a reasonable person and whether it was supported by law and fact." (internal quotation marks and citations omitted) ); United States v. 515 Granby, LLC , 736 F.3d 309, 315-17 (4th Cir. 2013) (considering the government's pre- and post-litigation conduct as a whole and noting that "an unreasonable prelitigation position will generally lead to an award of attorney's fees under the EAJA"); United States v. Hurt , 676 F.3d 649, 653-54 (8th Cir. 2012) (examining government's conduct as a whole); Gomez-Beleno v. Holder , 644 F.3d 139, 145 n.3 (2d Cir. 2011) (considering the government's position as a whole rather than making separate substantial justification findings for different stages of the proceedings); Wagner v. Shinseki , 640 F.3d 1255, 1259 (Fed. Cir. 2011) (assessing the government's litigation position in totality); Saysana v. Gillen , 614 F.3d 1, 5-7 (1st Cir. 2010) (same); Hackett v. Barnhart , 475 F.3d 1166, 1173-74 (10th Cir. 2007) (same); Sims v. Apfel , 238 F.3d 597, 602 (5th Cir. 2001) (same); United States v. Jones , 125 F.3d 1418, 1428-29 (11th Cir. 1997) (same); Hanover Potato Prods., Inc. v. Shalala , 989 F.2d 123, 131 (3d Cir. 1993) (adopting a single inquiry test, though contrary to our holding in this case, requiring a district court to "evaluate every significant argument made by an agency ... to determine if the argument is substantially justified" as "necessary to ... determine whether, as a whole , the Government's position was substantially justified").
      The D.C. and Seventh Circuits stand alone in declining to adopt a single inquiry test. The D.C. Circuit has rejected a reading of Jean that would preclude a claim-by-claim determination on the ground that such a rule would render the EAJA a "virtual nullity" because government conduct is nearly always grouped with or part of some greater, and presumably justified, action. Air Transport Ass'n of Canada v. F.A.A ., 156 F.3d 1329, 1332 (D.C. Cir. 1998). In the same vein, the Seventh Circuit has cautioned against taking "judicial language out of context," reasoning that Jean "does not address the question whether allocation is permissible under the [EAJA], thus allowing an award of fees for the part of the government's case that was not substantially justified." Gatimi v. Holder , 606 F.3d 344, 350 (7th Cir. 2010). We understand these concerns, but we think that Congress clearly contemplated the denial of attorneys' fees even where some of the litigation conduct was unjustified when it used the qualifying term "substantial" rather than "total" or "complete." See 28 U.S.C. § 2412(d)(1)(A) ; see also United States v. Rubin , 97 F.3d 373, 375-76 (9th Cir. 1996) (affirming the district court's denial of fees because the government was substantially justified in most, but not all, of its positions). Further, we conclude that this happenstance will predominantly affect cases challenging the government agency's litigation position, and likely have little effect in cases where the government agency's conduct is unjustified, as EAJA "fees generally should be awarded where the government's underlying action was unreasonable even if the government advanced a reasonable litigation position." Marolf , 277 F.3d at 1159.
     
      
      "Remand" is something of a misnomer, albeit one oft used in agency cases, as in fact "the civil action seeking judicial review of the ... final decision," Shalala v. Schaefer , 509 U.S. 292, 299, 113 S.Ct. 2625, 125 L.Ed.2d 239 (1993) (internal citation and quotation marks omitted), is terminated, not remanded.
     
      
      And even if Corbin did apply to this case, the district court misapplied Corbin because it evaluated whether each individual argument at each stage of the litigation was substantially justified, rather than the government's position at each stage as a whole.
     
      
      We make no findings, nor can we on appeal, as to how this mistaken placement came about, and we ascribe no nefarious motivations to the government as an entity. Again, we cannot know on this record precisely why Dr. Ibrahim's name was listed on the TSDB watchlist to begin with.
     
      
      We do not find that the government's defense of this litigation was unreasonable at all points of the litigation. Instead, what was not substantially justified was the government's continued defense of issues even after the reasons justifying their defense disappeared. For example, the government was justified in initially raising standing arguments, but was not justified in continuing to raise the same meritless standing arguments on numerous occasions once that issue had been definitively resolved by both our court and the district court. In a similar vein, while the government may have been justified in defending this litigation and refusing to tell Dr. Ibrahim her No Fly list status pursuant to its Glomar policy-a policy whereby the government refuses to confirm or deny the existence of documents in response to a Freedom of Information Act request, see N.Y. Times v. U.S. Dep't of Justice , 756 F.3d 100, 105 (2d Cir. 2014), amended by 758 F.3d 436 (2d Cir. 2014) -any justification it had to defend Dr. Ibrahim's No Fly list status vanished once she was made aware of her watchlist statuses and it had admitted its mistake in 2013.
      Further, when considering the government's litigation position, we also consider the government's positions on discovery and other non-merits issues, i.e., the government's conduct as a whole. See United States v. Rubin , 97 F.3d 373, 375 (9th Cir. 1996) (citing United States v. Powell , 379 U.S. 48, 57-58, 85 S.Ct. 248, 13 L.Ed.2d 112 (1964) ) (considering government's conduct during discovery when performing substantial justification inquiry). Here, as discussed at length below, the government played discovery games, made false representations to the court, misused the court's time, and interfered with the public's right of access to trial. Thus, the government attorneys' actual conduct during this litigation was ethically questionable and not substantially justified.
     
      
      The partial dissent argues that "Supreme Court precedent requires that we allow the district court to make [the] determination" as to whether the government's position was substantially justified. Concurring & Dissenting Op. at 1188 (citing Pierce , 487 U.S. at 560, 108 S.Ct. 2541 ); see also id. at 1188-89. Not so. The dissent is actually quoting from the portion of the Pierce decision where Justice Scalia is deciding which of the three general standards of review should apply to the district court's "substantial justification" determination-de novo, clear error, or abuse of discretion. Pierce , 487 U.S. at 558, 108 S.Ct. 2541. He decides that the abuse of discretion standard applies because the appropriate degree of deference is inherent in the standard itself. Id. at 559-63, 108 S.Ct. 2541. Here, we applied the abuse of discretion standard and concluded the district court abused its discretion. Notably, in Pierce , the Court also declared that an abuse of discretion standard will "implement our view that a 'request for attorney's fees should not result in a second major litigation.' " Id. at 563, 108 S.Ct. 2541 (quoting Hensley , 461 U.S. at 437, 103 S.Ct. 1933 ). But that is exactly what has happened here. See infra Part V. We have already engaged in the "unusual expense" of reviewing over 7,000 pages of record and over 1,000 pages of trial exhibits, Pierce , 487 U.S. at 560, 108 S.Ct. 2541, and we see no further need to triplicate this work.
     
      
      See, e.g. , Hensley , 461 U.S. at 438, 103 S.Ct. 1933 (concluding that, despite the differences in legal theories and some facts, "[g]iven the interrelated nature of the facts and legal theories in this case, the District Court did not err in refusing to apportion the fee award mechanically on the basis of respondents' success or failure on particular issues").
     
      
      See, e.g. , Webb , 330 F.3d at 1169 (holding that the plaintiff's unsuccessful false arrest claim was "unquestionably" related to the successful claims for false imprisonment and malicious prosecution, and allowing his attorney to recover fees for time spent in pursuit of that claim because "all [of plaintiff's] claims arose out of a common core of facts and a common course of conduct: Plaintiff's arrest, detention, and prosecution"); see also Thorne v. City of El Segundo , 802 F.2d 1131, 1142 (9th Cir. 1986) (reasoning that a police department clerk-typist's claims for discriminatory hiring and unconstitutionally obtained information could be related because they both concerned a polygraph interview she underwent during which the department discussed her sexual history); cf. Schwarz , 73 F.3d at 902-04 (determining that an employee's claims of employment discrimination against offices in Phoenix, Arizona and Portland, Oregon were distinct because they were predicated on independently discriminatory conduct by different actors, relating to different employment positions, in different states).
     
      
      See, e.g. , Murphy v. Smith , 864 F.3d 583, 586 (7th Cir. 2017) ("Where claims are closely related, however, a plaintiff who obtains excellent results should recover a fully compensatory fee even if he did not prevail on every contention in the lawsuit or if a court rejected or did not reach certain grounds supporting the excellent result." (citation omitted) ); Sakhawati v. Lynch , 839 F.3d 476, 480 (6th Cir. 2016) (declining to reduce fees where all of the claims pertained to one asylum application and related evidence); SecurityPoint Holdings, Inc. v. Transp. Sec. Admin. , 836 F.3d 32, 41 (D.C. Cir. 2016) ("We believe that [the plaintiff's] petition for review presented only one claim for relief-that TSA's denial of the cease-and-desist request was unlawful and must be set aside. Its assertion of several distinct grounds does not create multiple claims. But even if we treated the various grounds as separate claims, they are related in the sense meant by Hensley ." (citation omitted) ); Wal-Mart Stores, Inc. v. Barton , 223 F.3d 770, 773 (8th Cir. 2000) (applying Hensley to 42 U.S.C. § 2000e-5(k) and finding that the plaintiff's "state claims of assault and battery, outrage, and negligent retention shared a common core of facts with her Title VII claims, all of which arose from [the defendant's] alleged sexual harassment of [the plaintiff]"); United States v. Jones , 125 F.3d 1418, 1430 (11th Cir. 1997) ("[U]nder Hensley , a plaintiff who has prevailed against the United States on one claim may recover for all the hours reasonably expended on the litigation even though he or she failed to prevail on other claims involving a common core of facts or related legal theories."); Jane L. v. Bangerter , 61 F.3d 1505, 1512 (10th Cir. 1995) ("We have refused to permit the reduction of an attorneys fee request if successful and unsuccessful claims are based on a 'common core of facts.' ... Claims are also related to each other if based on 'related legal theories.' " (citations omitted) ); Keely v. Merit Sys. Prot. Bd. , 793 F.2d 1273, 1275-76 (Fed. Cir. 1986) (rejecting the government's argument that the court should reduce attorneys' fees and individually evaluate each of the plaintiff's separate arguments where the plaintiff only prevailed on one); Citizens Council of Del. Cty. v. Brinegar , 741 F.2d 584, 596 (3d Cir. 1984) (concluding that "it is clear that there was a sufficient interrelationship among the essential claims advanced by the plaintiff in the course of the litigation that the district court was not required to apportion fees based on the success or failure of any particular legal argument advanced by the plaintiffs"); cf. Paris v. U.S. Dep't of Hous. & Urban Dev. , 988 F.2d 236, 240 (1st Cir. 1993) (concluding, in the context of analyzing a related provision of the Fair Housing Act, that if the case involves what is essentially a single claim arising from "a common nucleus of operative fact," and the plaintiff advances separate legal theories that "are but different statutory avenues to the same goal," then all of the time should be compensable), overruled on other grounds by Buckhannon Bd. & Care Home, Inc. v. W. Va. Dep't of Health & Human Res. , 532 U.S. 598, 121 S.Ct. 1835, 149 L.Ed.2d 855 (2001).
      Only the Second Circuit has interpreted Hensley to allow the lodestar reductions in cases where multiple claims involve a common nucleus of fact. Kassim v. City of Schenectady , 415 F.3d 246, 256 (2d Cir. 2005) ("[A] district judge's authority to reduce the fee awarded to a prevailing plaintiff below the lodestar by reason of the plaintiff's 'partial or limited success' is not restricted ... to cases of multiple discrete theories ...."). The Fourth and Fifth Circuits have not yet reached this issue. See Vaughns by Vaughns v. Bd. of Educ. of Prince George's Cty. , 770 F.2d 1244, 1245 (4th Cir. 1985) (affirming the district court's fee determination based on the standard of review, and not reaching whether its relatedness analysis, which focused on whether the claims arose from a common course of conduct, was accurate).
     
      
      In opening argument at trial, Dr. Ibrahim's attorney Elizabeth Pipkin stated:
      In another Homeland Security presidential directive, the president calls for the end of abuse of student visas and increased the scrutiny of foreign students during the time that Dr. Ibrahim was studying at Stanford. In the months prior to the November 2004 presidential election and continuing up until the inauguration, the government ramped up its efforts to interrogate Muslims in America in a national dragnet called the October Plan, or Operation Front Line.
      The government's decision to target foreign students had a strong effect on the Muslim student community at Stanford. That community emailed its members, including Dr. Ibrahim, to advise them that there may be an increased likelihood that law enforcement would contact them and that if they were contacted, they should cooperate.
      The district court never made a factual finding regarding whether this allegation was true.
     
      
      Our sister circuits have recognized the difficult task facing lawyers navigating the complexities of civil rights litigation. The D.C. Circuit, for example, has emphasized that
      [a] lawyer who wins full relief for her client on one of several related claims ... is not apt to be criticized because the court failed to reach some of the grounds, or even ruled against the client on them. ... After the fact, it is of course easier to identify which arguments were winners and which were losers and state forcefully how an attorney's time could have been better spent. But litigation is not an exact science. In some cases, the lawyer's flagship argument may not carry the day, while the court embraces a secondary argument the lawyer rated less favorably. That is precisely why lawyers raise alternative grounds-a practice which is explicitly sanctioned by our Rules of Civil Procedure.
      Goos v. Nat'l Ass'n of Realtors , 68 F.3d 1380, 1386 (D.C. Cir. 1995) ; see also id . at 1384-86.
      The Seventh Circuit similarly has rejected the panel's ex post approach:
      For tactical reasons and out of caution lawyers often try to state their client's claim in a number of different ways, some of which may fall by the wayside as the litigation proceeds. The lawyer has no right to advance a theory that is completely groundless or has no factual basis, but if he presents a congeries of theories each legally and factually plausible, he is not to be penalized just because some, or even all but one, are rejected, provided that the one or ones that succeed give him all that he reasonably could have asked for.
      Lenard v. Argento , 808 F.2d 1242, 1245-46 (7th Cir. 1987). Other circuits are in accord. See, e.g. , Jordan v. City of Cleveland , 464 F.3d 584, 604 (6th Cir. 2006) ("[L]itigation is not an 'exact science': Lawyers cannot preordain which claims will carry the day and which will be treated less favorably."); Robinson v. City of Edmond , 160 F.3d 1275, 1283 (10th Cir. 1998) ("Litigants should be given the breathing room to raise alternative legal grounds without fear that merely raising an alternative theory will threaten the attorney's subsequent compensation.").
     
      
      See Game of Thrones: The Red Woman (Home Box Office, Inc. broadcast Apr. 24, 2016).
     
      
      The government has since changed its policy regarding contesting placement on the No Fly list. It now allows certain categories of individuals to challenge their No Fly list status.
     
      
      For example, in Latif v. Holder , 28 F.Supp.3d 1134 (D. Or. 2014), where U.S. citizens and lawful permanent residents challenged their allegedly wrongful placement on the No Fly list, the district court held at the summary judgment stage that the DHS Traveler Redress Inquiry Program process "falls far short of satisfying the requirements of due process," and that "the absence of any meaningful procedures to afford Plaintiffs the opportunity to contest their placement on the No-Fly List violates Plaintiffs' rights to procedural due process." Id. at 1161. In evaluating the procedural due process factors from Mathews v. Eldridge , 424 U.S. 319, 96 S.Ct. 893, 47 L.Ed.2d 18 (1976), the Latif court cited to Dr. Ibrahim's case, the only available case involving a due process challenge to watchlisting procedures, to find that the plaintiffs had been deprived of their liberty interests in travel, and that the DHS redress process contains a high risk of erroneous deprivation of constitutionally-protected interests. 28 F.Supp.3d at 1148, 1152-53. Today, relief from No Fly list errors is widely recognized as available. See, e.g. , Murtaza Hussain, How a Young American Escaped the No Fly List , Intercept (Jan. 21, 2016, 4:30 AM), https://theintercept.com/2016/01/21/how-a-young-american-escaped-the-No-Fly-list/.
     
      
      As of 2014, it was reported that there are 680,000 individuals listed in the TSDB and 47,000 individuals listed on the No Fly list, and that these lists are littered with errors. See Ibrahim II , 669 F.3d at 990 (noting that there are significant numbers of erroneous placements on the federal watchlists).
     
      
      Placement on the No Fly list can also affect an individual's visa eligibility, lead to arrest and temporary incarceration, and be considered in the probable cause inquiry of a bail determination. See United States v. Duque , No. CR-09-265-D, 2009 WL 3698127, at *5 (W.D. Okla. Nov. 2, 2009) (describing presence on the VGTOF as part of "officers' collective knowledge" reasonably used to determine probable cause for an arrest). What is more, "[the U.S. government] shares the TSDB [watchlisting database] with 22 foreign governments," so there are doubtless international repercussions even if a listed person never tries to enter the United States, fly over U.S. airspace, or use a U.S. carrier. Ibrahim II , 669 F.3d at 993.
      Dr. Ibrahim suffered these consequences. She was deprived of her right to travel, Kent v. Dulles , 357 U.S. 116, 125, 78 S.Ct. 1113, 2 L.Ed.2d 1204 (1958) : she was unable to return to Stanford to pursue her degree; forced to leave the United States permanently, without warning, after living here for thirteen years; and not allowed to return to testify at her own trial. She was arrested, Hamdi v. Rumsfeld , 542 U.S. 507, 529, 124 S.Ct. 2633, 159 L.Ed.2d 578 (2004), and humiliated, Paul v. Davis , 424 U.S. 693, 701, 711, 96 S.Ct. 1155, 47 L.Ed.2d 405 (1976).
     
      
      See Airline Activity: National Summary (U.S. Flights) , Bureau Transp. Stats., https://www.transtats.bts.gov/ (last visited July 26, 2018).
     
      
      The district court made no findings as to whether the agencies acted in bad faith before litigation, and we do not have a record basis upon which to consider this argument. As the district court speculated, however, the government's initial interest in Dr. Ibrahim may have rested on shaky constitutional grounds because it may have been motivated by racial or religious animus. Dr. Ibrahim alleged that, at the time Agent Kelley first investigated Dr. Ibrahim for potential watchlisting placement, the government had a heightened interest in foreign students like her who were in the United States from Muslim countries on U.S. student visas. Stanford University had specifically contacted these students, warning them of the government's potential interest. However, because the district court did not reach this issue despite having more familiarity with the extensive record, we cannot conclude that the government's initial interest in Dr. Ibrahim was in bad faith.
     
      
      Even after Agent Kelley learned of his mistake, Agent Kelley never reviewed his old files to see if he had accidentally nominated others to the No Fly list in the hope it was a one-time mistake. But Agent Kelley's hope was not grounded in reality. If Agent Kelley nominated Dr. Ibrahim because he misread the form, this may well not have been a one-time event-he likely would have made the same mistake other times he used the same form.
     
      
      The government explicitly stated in a response to a court order asking the government to confirm its position on this very question:
      Defendants affirm that they will not rely on any information they have withheld on grounds of privilege from Plaintiff in response to a discovery request in this case. Defendants are mindful of the Court's December 20, 2012 ruling (Dkt. [No.] 399) that the Government may not affirmatively seek to prevail in this action based upon information that has been withheld on grounds of privilege, and have acted in a manner consistent with that ruling in both the assertion of privilege and summary judgment briefing.
     
      
      Dr. Ibrahim also argues that the government acted in bad faith by giving the district court secret evidence and secret case law. While the district court ultimately held that the government was not justified in these ex parte communications, it is not clear that such communications were so clearly precluded by precedent that the ex parte communications were outside the bounds of acceptable conduct.
     
      
      For example, the government also made depositions exceedingly difficult by lodging over 200 objections and instructions not to answer to questions.
     
      
      "[H]istorically both civil and criminal trials have been presumptively open." Richmond Newspapers, Inc. v. Virginia , 448 U.S. 555, 580 n.17, 100 S.Ct. 2814, 65 L.Ed.2d 973 (1980) (plurality opinion); see also id . at 596, 100 S.Ct. 2814 (Brennan, J., concurring in judgment) (emphasizing value of open civil proceedings); id . at 599, 100 S.Ct. 2814 (Stewart, J., concurring in judgment) (remarking that the First Amendment provides a right of access to civil and criminal trials).
     
      
      The Johnson factors are: (1) the time and labor required; (2) the novelty and difficulty of the questions; (3) the skill requisite to perform the legal service properly; (4) the preclusion of other employment; (5) the customary fee in the community for similar work; (6) the fixed or contingent nature of the fee; (7) time limitations imposed by the client or the circumstances; (8) the amount involved and the results obtained; (9) the experience, reputation, and ability of the attorneys; (10) the "undesirability" of the case; (11) the nature and length of the professional relationship with the client; and (12) awards in similar cases. Johnson , 488 F.2d at 717-19.
     
      
      We do not reach each of the objections to the special master's recommendations, as the fee award is vacated, and many of the objections may be mooted as a result of our opinion, which will require a substantial redetermination of the fee award, as well as commensurate costs.
     
      
      See Anderson v. City of Bessemer City, N.C. , 470 U.S. 564, 573, 105 S.Ct. 1504, 84 L.Ed.2d 518 (1985) ("The reviewing court oversteps the bounds of its duty under Rule 52(a) if it undertakes to duplicate the role of the lower court."); see also S.E.C. v. Rogers , 790 F.2d 1450, 1458 (9th Cir. 1986) (noting that "as a court of limited review" the Ninth Circuit "must abide by the clearly erroneous rule when reviewing a district court's findings.").
     
      
      The majority asserts that the government should have sought review of Ibrahim II by the Supreme Court, but as Ibrahim II reversed and remanded for further proceedings, the government could have decided not to press the issue at that time.
     