WASHINGTON (AP) -- The Senate confirmed Gina Haspel on Thursday as the first female director of the CIA following a difficult nomination process that reopened an emotional debate about brutal interrogation techniques in one of the darkest chapters in the spy agency's history.
The 54-45 vote split both parties, with six Democrats joining most Republicans in support. It was the closest vote for a CIA nominee in nearly seven decades, since the law was changed to require Senate confirmation.
Senate Majority Leader Mitch McConnell, R-Ky., called President Donald Trump's choice of Haspel to lead the agency "the right woman at the right time."
McConnell steered the confirmation swiftly past opponents, including the ailing Republican Sen. John McCain, whose long-distance rejection of the nominee over her role in the CIA's torture program hung over an impassioned debate. McCain, who was captured and tortured in the Vietnam War, is at home in Arizona while battling brain cancer and did not vote.
Before voting began, McConnell said Haspel "demonstrated candor, integrity, and a forthright approach" throughout the confirmation process and "has quietly earned the respect and admiration" of intelligence community leaders at CIA headquarters and abroad.
Supporters cited Haspel's 33-year career at the agency. Former top intelligence officials said she earned the chance to take the helm of the intelligence agency.
But Haspel's nomination was contentious because of her role in a former CIA program to brutally detain and interrogate terror suspects at covert sites abroad following Sept. 11.
Her opponents said it wasn't right to promote someone who supervised a black site in Thailand. They said the U.S. needs to close the book forever on the program that marred America's image with allies abroad.
Several senators said Haspel was not forthcoming in answering questions about her role in the torture program or the CIA's decision to destroy videotaped evidence of the sessions. They also had questions about her rejection of the now-banned techniques.
Sen. Ron Wyden, D-Ore., said in a floor speech that Haspel "offered up almost the classic Washington nonapology."
He asked how the Senate could take seriously Haspel's "conversion on torture."
Sens. Rand Paul of Kentucky and Jeff Flake of Arizona were the two Republicans who voted against Haspel.
Among Democrats supporting Haspel are several who are up for re-election this fall in states where Trump is popular, including Sens. Joe Manchin of West Virginia, Heidi Heitkamp of North Dakota, Joe Donnelly of Indiana and Bill Nelson of Florida. Other Democrats voting yes were Sen. Mark Warner of Virginia and Sen. Jeanne Shaheen of New Hampshire.
Some Trump-state Democrats, though, including Sen. Doug Jones of Alabama, opposed the nominee. He said this week that "it's just hard to get over" the torture issue.
A protester in the Senate visitor gallery briefly disrupted speeches ahead of the vote with shouts against the CIA.
Haspel, 61, is a native of Kentucky but grew up around the world as the daughter of an Air Force serviceman. She worked undercover for nearly all her three decades at the CIA in Africa, Europe and classified locations around the globe. Haspel, who learned Turkish and Russian, was tapped as deputy director of the CIA last year. She worked under former CIA director Mike Pompeo until President Donald Trump moved him to secretary of state. She has been serving as acting director.
Haspel received robust backing from former intelligence, diplomatic, military and national security officials. Among those who supported her nomination were six former CIA directors -- Porter Goss, John Brennan, Leon Panetta, George Tenet, William Webster and Mike Hayden -- and three former national intelligence directors -- James Clapper, Mike McConnell and John Negroponte.
On the opposing side are groups such as the American Civil Liberties Union, which says she should have stood up against the interrogation practices then. More than 100 former U.S. ambassadors who served both Republican and Democratic presidents sent the Senate a letter opposing Haspel, saying that despite her credentials, confirming her would give authoritarian leaders around the world the license to say U.S. behavior is "no different from ours."