This undated photo released by the CIA, shows CIA Deputy Director Gina Haspel. Haspel, who joined the CIA in 1985, has been chief of station at CIA outposts abroad. In Washington, she has held several top senior leadership positions, including deputy director of the National Clandestine Service and deputy director of the National Clandestine Service for Foreign Intelligence and Covert Action. (AP)

President Donald Trump’s pick to head the CIA was at the center of a legal dispute regarding her role in a high-profile torture case involving a pair of Spokane psychologists.

Attorneys wanted to question Gina Haspel and another CIA official, James Cotsana, about whether they supervised the interrogation of three terrorism suspects using a program developed by James E. Mitchell and Bruce Jessen of Spokane.

According to the lawsuit that unfolded in Spokane, Suleiman Abdullah Salim, Mohamed Ahmed Ben Soud and the late Gul Rahman suffered waterboarding, beatings and sleep deprivation while inside CIA “black sites.” In the case, attorneys sought access to interview Haspel about her role.

After surviving the interrogations, both Salim and Ben Soud were later released after officials determined that they posed no threat to the United States.

The government settled the lawsuit filed by the ACLU last August just a couple weeks before it was set to go to trial in Spokane. The suit followed and relied heavily upon documents from a U.S. Senate investigation in 2014 found that Mitchell and Jessen’s techniques produced no actionable intelligence in the war on terror.

Before the case was dismissed, one of the attorneys who represented Mitchell and Jessen sought to have U.S. District Court Judge Justin Quackenbush to authorize depositions of the CIA’s Haspel and Cotsana, who they said oversaw the interrogation of several enemy combatants held at dark sites.

Attorney Brian Paszamant argued in court in Spokane on May 5, 2017, that his legal team needed “documents” from Haspel and Cotsana to effectively defend Mitchell and Jessen.

It led to a testy exchange between Judge Quackenbush and Justice Department attorney Andrew Warden, who refused to provide a list of documents relating to Haspel and Cotsana in open court.

“I’m running this court. Not you, Mr. Warden,” Quackenbush said on May 5. “I’m directing you to identify which documents” relate to Haspel and Cotsana. “I think that is the most important matter here today.”

“I cannot do that without prejudicing our case,” Warden responded.

ACLU attorney Dror Ladin, who represented the men who were tortured, argued that day that depositions of Haspel and Cotsana would have no bearing on the interrogation program in which the government paid Mitchell and Jessen some $81 million.

“It’s never been a defense in a torture or war crimes case to say I was just following instructions,” Ladin said. “This case has always been about the defendants designing the program … and those techniques being used against our clients.”

Haspel was named Tuesday as Trump’s replacement for Mike Pompeo, who himself was nominated to replace fired Secretary of State Rex Tillerson. After learning of Haspel’s promotion, Human Rights First’s Raha Wala told the Associated Press that Haspel should be barred from leading the CIA.

“No one who had a hand in torturing individuals deserves to ever hold public office again, let alone lead an agency,” Wala said Tuesday. “To allow someone who had a direct hand in this illegal, immoral and counterproductive program is to willingly forget our nation’s dark history with torture.”

However, if Haspel is confirmed, her appointment would also make history in the male-dominated spy agency.

Since the CIA was formally established in September 1947, not one of its directors has been a woman. When it was founded after World War II, women – many of them former operatives from the CIA’s precursor, the Office of Strategic Services – have worked for Langley, according to the Washington Post.

Some, including legendary World War II spy Virginia Hall, were highly accomplished and brave operatives, but did not earn the same salaries or promotions as their male counterparts. A far larger number of the agency’s women worked as secretaries or clerks.

The CIA from its earliest days has acknowledged the inequities and has attempted to remedy them. In the early 1950s, then-director Allen Dulles ordered up an internal review – led by a group of CIA women famously called “The Petticoat Panel” – to examine the pay and rank disparities between male and female employees.

According to the CIA’s website, the report found that the median grade for women was GS-5 and, for men, GS-9. Not a single woman worked in the senior executive service.

Over the years, the CIA has dramatically increased the number of women in its ranks, with the agency reporting that the percentage of women at the agency was just under 50 percent, including full and part-time employees.

Women have also played major roles in two key moments in the agency’s history: They led the team that identified Aldrich Ames as one of the agency’s most notorious Russian moles; and they also dominated the group known as Alec Station that had been established in the years before the Sept. 11 terrorist attacks to track Osama bin Laden and al-Qaida operatives.

The Associated Press and Washington Post contributed to this report.