Acting Director of the Central Intelligence Agency Gina Haspel sits down after being sworn-in to testify during her confirmation hearing before the United States Senate Intelligence Committee on Capitol Hill in Washington, D.C., on Wednesday, May 9, 2018. (Alex Brandon/Pool via CNP/Sipa USA/TNS)

Gina Haspel, President Donald Trump’s nominee to run the CIA, is on track to be confirmed by the U.S. Senate after key Democrats announced their support Tuesday.

Her nomination has been deeply controversial because she once ran a secret prison in Thailand where detainees were waterboarded after the Sept. 11, 2001, terrorist attacks. That chapter in her 33-year career remains shrouded in mystery because officials have refused to declassify more information about it.

But Sen. Mark Warner, D-Va., the vice chairman of the Senate Intelligence Committee, Sen. Heidi Heitkamp, D-N.D., and Sen. Bill Nelson, D-Fla., said Tuesday that they would vote for her.

Warner’s support came after Haspel sent him a letter in which she said the CIA’s secret prison network had been a mistake from the start.

“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,” Haspel wrote.

That statement went a step further than Haspel had been willing to go in her confirmation hearing, in which she pledged to never revive the interrogation program.

After the hearing, two Democrats, Sen. Joe Manchin, D-W.Va., and Sen. Joe Donnelly, D-Ind., had announced they would back Haspel. Two Republicans, Sens. Rand Paul of Kentucky and John McCain of Arizona, have said they oppose her.

Republicans have only a 51-49 majority in the Senate. With Paul and McCain opposing Haspel, Democratic support became crucial to her confirmation.

Now, the support from five Democrats means Haspel likely has the votes she needs. She would be the first woman to head the spy agency, as well as the first operations officer to rise through the ranks to the agency’s top spot in decades.

It’s unclear when the Senate will hold the vote.

Haspel faced an uncertain path to confirmation two months ago when Trump announced her as his nominee to replace Mike Pompeo, the former Republican congressman who is now secretary of State.

Although she received strong support from the intelligence community, including former CIA directors who served under presidents from both political parties, Haspel’s role in the interrogation program led to an outcry from human rights activists and many Democrats.

In announcing his backing, Warner said he believed she would be a capable director.

“Over the last year I’ve had the opportunity to work with Ms. Haspel in her role as deputy director, and I have always found her to be professional and forthright with the Intelligence Committee,” Warner said in a statement.

“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.”

Heitkamp said Haspel had assured her that torture would never be used in the future.

“While I trust her word, I will also verify, helping to ensure Congress conducts robust oversight of the CIA under her leadership,” she said in a statement.

California’s senators, both Democrats, remain opposed to Haspel.

“The United States must send a message to the world that we hold ourselves to a higher standard than our enemies,” said a statement from Sen. Dianne Feinstein, the former chair of the Intelligence Committee, who spearheaded a critical 2014 report on the agency’s interrogation program.

Sen. Kamala Harris tweeted that supporting Haspel would send “the wrong signal to the CIA workforce, the American people, and countries abroad about our values.”

McCain, a steadfast critic of torture who suffered abuse as a prisoner during the Vietnam War, announced his opposition to Haspel after her confirmation hearing, when she declined to say whether the CIA’s past practices were immoral. He’s been fighting cancer at home in Arizona, and it’s unclear whether he will be able to return to Capitol Hill to cast a vote.

“I believe Gina Haspel is a patriot who loves our country and has devoted her professional life to its service and defense,” he said in a statement. “However, Ms. Haspel’s role in overseeing the use of torture by Americans is disturbing. Her refusal to acknowledge torture’s immorality is disqualifying.”