The US Senate has confirmed Gina Haspel to be new director of the CIA, ending a bruising confirmation fight around her ties to the agency's past use of waterboarding and other brutal interrogation techniques.
Haspel, who will be the first woman director of the agency, is a 33-year veteran at the CIA, currently serving as its acting director.
Haspel was approved despite stiff opposition over her links to the CIA's use of harsh interrogation methods in the years after the September 11 attacks.
An undercover officer for most of her CIA career, Haspel in 2002 served as CIA station chief in Thailand, where the agency conducted interrogations at a secret prison using methods including waterboarding.
Three years later, she drafted a cable ordering the destruction of videotapes of those interrogations.
Republican Senator John McCain, who has been away from Washington all year as he battles brain cancer, urged the Senate not to vote for Haspel.
Tortured himself while a prisoner of war in Vietnam, McCain said approving Haspel would send the wrong message, and the country should only use methods to keep itself safe "as right and just as the values we aspire to live up to and promote in the world."
Haspel also had strong support from Republican President Donald Trump's administration, many current and former intelligence officials and a wide range of lawmakers, including Democrats.
Senator Mark Warner, the top Democrat on the Intelligence Committee, which oversaw the nomination, supported Haspel.
"I believe she is someone who can and will stand up to the president, who will speak truth to power if this president orders her to do something illegal or immoral, like a return to torture," he said in a Senate speech before the vote.