A key US Senate panel on Wednesday greenlighted the nomination of veteran covert operative Gina Haspel to become director of the Central Intelligence Agency, despite her involvement in the torture of Al-Qaeda detainees in the early 2000s.

The Intelligence Committee voted 10-5 to forward her nomination to the entire Senate, virtually assuring that she will earn final approval to

lead the US spy agency, replacing Mike Pompeo, who is now secretary of state.

Republican Senator John McCain, who was tortured during years spent as a prisoner of war in Vietnam, led a push to reject Haspel after she refused to say the brutal interrogation methods used after the 9/11 attacks were "immoral."

But she reiterated her opposition to the practice going forward in a letter sent earlier this week to the committee's senior Democrat, Mark Warner, persuading him to endorse her.

"With the benefit of hindsight and my experience as a senior agency leader, the enhanced interrogation program is not one the CIA should have undertaken," she told Warner in the letter dated Monday.

Warner's support was matched by one other unnamed Democrat in the secret vote, ensuring the closely divided Senate will also be able to pass Haspel through in a vote expected to come before the end of the month.

It will make Haspel, a 61-year-old Russia specialist, the first-ever woman to lead the CIA, and the first director who spent their entire career in the agency's clandestine services.

"Gina Haspel is the most qualified person the president could choose to lead the CIA and the most prepared nominee in the 70-year history of the agency," said committee chairman Richard Burr in a statement.

Warner echoed that sentiment.

"I believe that she will be a strong advocate for the agency's workforce, and an independent voice who can and will stand up on behalf of our nation’s intelligence community," he said.

"Most importantly, I believe she is someone who can and will stand up to the president if ordered to do something illegal or immoral -- like a return to torture."

But Democrat Ron Wyden, one of the most strident opponents to the torture program, said he still has "grave concerns" about her suitability, rooted in still-classified matters that Haspel and the agency refused to make public.

The refusal to declassify the matters, Wyden said, has "only to do with protecting her own image."