In this May 9, 2018 photo, CIA nominee Gina Haspel testifies during a confirmation hearing of the Senate Intelligence Committee, on Capitol Hill in Washington. In a letter Tuesday to the top Democrat on the Senate Intelligence Committee, Haspel says she would “refuse to undertake any proposed activity that is contrary to my moral and ethical values.” (AP Photo/Pablo Martinez Monsivais)

WASHINGTON | 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.

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.

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.

The Associated Press is an independent, not-for-profit news cooperative of 1,300 newspapers, including The Sentinel, headquartered in New York City. News teams in over 100 countries tell the world’s...