The Senate has confirmed Gina Haspel as the first female director of the CIA following a rocky nomination process that reopened debate about one of the darkest chapters in the spy agency's history.

Thursday's vote was 54-45. Republican John McCain was absent. Nevada Senators were split on the vote. Catherine Cortez Masto (D-NV) voted no, while Republican Dean Heller (R-NV) voted yes. 

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.

Raha Wala at Human Rights First says the Senate's decision to confirm her was unwise. He says Human Rights First is putting Haspel on notice that Congress and the American people will hold her to her pledge to never reinstate such a program in the future.

Laura Pitter with Human Rights Watch says Haspel's confirmation is a "perverse byproduct of the U.S. failure to grapple with past abuses."

Haspel's supporters cited her 33-year career at the agency. Former top intelligence officials said she earned the chance to take the helm of the intelligence agency.

Last week Senator McCain issued a powerful statement opposing Haspel's candidacy, calling her role in overseeing the use of torture by Americans "disturbing."

"Her refusal to acknowledge torture's immorality is disqualifying," McCain said, citing Haspel's reluctance, during her public hearing, to provide a "yes" or "no" answer to a question from California Democrat Senator Kamala Harris on the subject. McCain's opposition became a key factor in swaying Arizona Republican Senator Jeff Flake's vote, and was cited by a number of Democrats who spoke out against her nomination in the following days and, just before the vote, on the Senate floor.

"There is no greater voice on this subject than John McCain's," said Senator Ron Wyden, D-Oregon, citing his "powerful and unimpeachable views" as reason to oppose Haspel's candidacy. As he had done in the weeks leading to the vote, Wyden also criticized parts of Haspel's background, the extent to which it remained classified, and her reluctance to admit, during her hearing, that the interrogation program was morally objectionable. "This nomination process has been a disservice to our constitutional duties, to our democratic principles and to the American people," Wyden said.

Those speaking out in favor of Haspel's candidacy – like Senate Intelligence Committee Vice Chairman Mark Warner, D-Virg. – cited, among other things, the immense support for Haspel from within the CIA. "I have heard from many Agency officers, and for that matter, members of the rank and file of other Intelligence Community agencies," Warner, who had announced his intention to support Haspel on Tuesday, said. "And almost to a person, this rank and file have supported her nomination."

He conceded he struggled with the decision – "To those here who have concluded that Ms. Haspel's background with the [Rendition, Detention and Interrogation] program should preclude her from leading the CIA – I respect their arguments, and I know the passion with which they put forward their position."

"I strongly believe that we, as Americans, have a duty to look squarely at our mistakes, and to not sweep them under the rug, but to learn from them, and in the future, to do better," Warner said.

(CBS News, The Associated Press contributed to this report.)