The woman chosen by President Donald Trump to lead the CIA will have to answer tough questions from US senators on Wednesday. But her career shows she has won most battles she has faced.
When Gina Haspel took up her first posting as a CIA officer in Africa, there were doubters. Perhaps it was because she was a young woman in a male-dominated environment. One of her tasks was taking over the running of an agent. Haspel proved the doubters wrong.
And in the subsequent three decades - many of them spent undercover - she would rise up the ranks of the CIA. Her rise, according to those who have known her, was not primarily because of her skill as a recruiter or runner of agents, but rather because she proved smart, tough and an adept player of bureaucratic politics.
Haspel was born in 1956; her father was in the Air Force and she grew up on bases overseas. She joined the CIA in 1985 and the first 15 years of her career would be shaped by Russia.
She began as a reports officer specialising in Russia and her supporters say she has more experience of Russia than other recent directors (and may be the first to speak the language).
But it was her time in the hothouse of counter-terrorism immediately after 9/11 that would prove to be the most defining period - and the one which has drawn the most fire from critics who believe it should disqualify her from running the CIA.
The first overseas station she ran was in Azerbaijan, a former Soviet republic. During her time there, she was involved in an operation which led to the detainment of two men linked to the 1998 US Embassy bombings in Kenya and Tanzania.
Counter-terrorism was eclipsing Russia as an important issue for the agency and Ms Haspel requested a transfer to CIA's Counterterrorism Center (CTC). Her first day was 11 September 2001.
When two planes hit New York that morning, most staff from the CIA headquarters at Langley were evacuated in case it too was a target. Staff found themselves milling around in the car park as the roads around Langley jammed with traffic. One of the few teams to stay were some parts of the CTC, including Ms Haspel.
The CIA is often subject to swings of a pendulum between aggressive covert action followed by exposure and retrenchment. After 9/11 the pendulum swung hard. The culture of the CTC was set from the top by its hard-charging head, Cofer Black, who felt that after having been restrained, the CIA was now going to be unleashed.
"The analogy would be the junkyard dog that had been chained to the ground was now going to be let go. And I just couldn't wait," he told me a few years later. Fearful of further catastrophic attacks, the boundaries of what was acceptable would be pushed in the coming years.
In late 2002, Ms Haspel took over the secret CIA base in Thailand where "enhanced interrogation" techniques were used - a euphemism for practises widely considered to constitute torture. She arrived after the waterboarding 83 times of Abu Zubaydah, but was there when Abd al Rahim al-Nashiri was waterboarded three times.
The years Ms Haspel spent at CTC are at the heart of the controversy over her nomination. The battle is, in part, about whether enough has been done to confront what happened in this period - and the relative blame CIA officers should carry.
Insiders say the CIA is ultimately an arm of the presidency. The priorities, the appetite for risk and the tone are set from the White House. Others counter that following orders - even at a time of such heightened fears - is not a good enough defence.
In 2005, Ms Haspel was involved in the destruction of video recordings of the waterboarding and other harsh interrogative techniques. The fear was that the tapes could be leaked and if so, would have a catastrophic impact on the CIA. A 2011 declassified disciplinary review by then-Deputy Director Michael Morell investigating the destruction cleared Ms Haspel of any blame, saying that even though she drafted the cable ordering the destruction, she did so on the direct orders of her boss, Jose Rodriquez (although she is believed to have been an advocate of the move).
The memo says she believed he had the approval of the director of the CIA. Only after the cable was sent did she learn he had not done so.
Ms Haspel was posted to London in 2008. She was well-regarded, according to British officials, who saw her as a forceful and effective advocate for the agency.
"She listened as well as lectured," says one former British official. On her arrival, British spies wanted to win her over and initially struggled to find a way of trying to make a personal connection (she is a fan of Johnny Cash but that did not help much).
Someone suggested she was a dog lover. As a result, an MI6 officer was given the mission of taking her to Crufts, the dog show. Whether or not it had any impact on Ms Haspel's attitude to the UK is unknown but it did earn the officer the nickname Fido from his colleagues.
On her agenda during her first posting was pushing the UK to take a greater role in the Predator drone programme that was pummelling Al Qaeda in Pakistan but which Britain had concerns about.
Ms Haspel left in 2011 but then returned for an unusual second posting in 2014 until 2017. There is speculation that at least one of her London postings was to keep her away from inquiries into post-9/11 practices taking place in Washington.
She returned to the US in February 2017. She was away during the drawing up of the intelligence community's assessment of Russian interference in the US election, but did play a key role in the recent expulsion of Russian diplomats.
When CIA Director Mike Pompeo was away, she took a lead role in briefing President Trump.
She has widespread support from across the US national security community, including those like former CIA Director John Brennan who have been fierce critics of Donald Trump. One reason is professional pride - it is rare for a career officer to rise up through the ranks all the way to the top of the CIA (the last was William Colby in the 1970s) and supporters say her experience means she can hit the ground running.
But another reason may be more practical. If not Gina Haspel, the question is, who else would Donald Trump pick to run CIA?
"What I say to folks who for one reason or another want to oppose Gina - [is] 'Be careful what you ask for'. Who might you get if you don't get this career professional?" former CIA director Michael Hayden said on a recent Intelligence Matters podcast.
Her ability to build a relationship with Donald Trump - and speak truth to power - is a key question.
There were concerns in some quarters when Donald Trump was elected that the pendulum would once again swing hard. On the campaign trail, he talked of resuming waterboarding.
Ms Haspel has communicated that she will not return to the practices of the post-9/11 period.
"We are not going back," one official told the BBC. "Under no circumstances will she restart interrogation programme." Insiders say lessons have been learnt and Ms Haspel's priority will be to focus on improving intelligence collection and tradecraft.
Mike Pompeo did push for more aggressive covert action (on Iran among other issues), but he has managed to retain support at the agency and his close relationship with the president kept it from being drawn into Washington's turbulent politics, or into the darker places some feared it might go.
If she can escape the controversies of her past, Gina Haspel will require all the skills she has shown in her rise to do the same, especially if the pressure grows for the pendulum to swing again.