Gina Haspel, strongly opposed by many for her role in CIA’s brutal torture program, was confirmed by the US Senate as first female director of the CIA, in a 54-45 vote.

The Senate confirmed Gina Haspel  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. Republican senator John McCain, who has undergone treatment for brain cancer, was absent for the vote.

Mitch McConnell, the Senate majority leader, called 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 McCain, whose long-distance rejection of the nominee over her role in the CIA’s torture program hung over an impassioned debate.

Before voting, 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 in Langley, Virginia, 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 9/11.