Gina Haspel appears to have secured enough votes to be confirmed as the country’s next CIA director after stating in a letter to a top Democrat that the agency never should have detained terrorist suspects and employed brutal interrogation techniques against them.

In announcing his support for Haspel, Senate Intelligence Committee Vice Chairman Mark R. Warner (D-Va.) said Tuesday that he had asked her to write down her views because he believed that in one-on-one meetings, she had expressed greater regret and more resolute moral opposition to the agency’s interrogation program than she had communicated during her confirmation hearing last week.

“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,” Warner said in a statement, citing his past interaction with Haspel and the overwhelming support for her among the agency’s rank and file and the wider intelligence community. He added he also had “respect” for those “who have made a different decision” about her nomination.

Warner’s support for Haspel provides more opportunity for her to gain the backing of other lawmakers who were conflicted about her nomination. Several Democrats facing tough reelection battles this year, as well as Republican Sen. Jeff Flake (Ariz.), have been caught between the pressures of an administration and agency forcefully lobbying for Haspel’s confirmation and the admonitions of senior senators such as John McCain (R-Ariz.) and Dianne Feinstein (D-Calif.), who have said a vote for Haspel is effectively telling the world that the United States condones torture.

Minutes after Warner’s announcement, Sen. Heidi Heitkamp (D-N.D.) — one of the GOP’s prime targets in 2018 — announced that she, too, would be supporting Haspel.

“This was not an easy decision. Ms. Haspel’s involvement in torture is deeply troubling as my friend and colleague, John McCain, so eloquently reminded us,” Heitkamp said in a statement. “However, Ms. Haspel explained to me that the agency should not have employed such tactics in past and has assured me that it will not do so in the future.”

Sen. Bill Nelson (D-Fla.), who is also up for reelection this year, announced late Tuesday afternoon that he also would vote for Haspel.

Warner said in an interview that he had “been wrestling with his” decision in light of warnings about the message endorsing someone with Haspel’s record would send. He said those concerns were “all fair points.”

Haspel, who played an integral role in the CIA’s interrogation program, pledged during her confirmation hearing last week that she would not restart it if approved to lead the agency. She refused to say, however, that the program had been immoral or wrong, defending the agency’s actions — and her own — as legal.

But Warner stressed that Haspel “had been more forthcoming in private” and that for a career spy like Haspel, it must have been “hard to have that kind of debut in that public a setting” and address every question perfectly.

“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 in her letter to Warner.

She stopped short of condemning the people “that made these hard calls,” and again cited “valuable intelligence collected” through the program — despite the findings of the Senate Intelligence Committee’s report on torture, released in 2014, which concluded that the CIA’s interrogation methods were not a viable means of gaining information. Those omissions — plus the fact that almost all records related to her career remain classified — will probably keep dozens of Democrats from voting for her.

But in saying the CIA never should have embarked on the program in the first place, she is putting distance between herself and other senior intelligence officials, many of whom acknowledge that the CIA made mistakes but defend the interrogation program as legal, presidentially authorized and a legitimate response to the immediate threat of attacks by al-Qaeda.

“The United States must be an example to the rest of the world, and I support that,” Haspel wrote.

In written answers the committee released Tuesday, Haspel also said she would disobey a direct order from Trump to waterboard a detainee and alert Congress if she ever came under political pressure to change an intelligence assessment. She said it “was a mistake not to brief the entire Committee at the beginning” of the program, acknowledging criticism that the CIA did not do enough to keep more than a handful of congressional overseers up to speed. At the same time, she appeared to implicate those members who did know about the interrogation program.

“Both the Committee and the Agency shared the goal of obtaining the critical intelligence needed to thwart another attack,” Haspel wrote.

Haspel played an integral role in the CIA’s program, both as a senior leader in the agency’s Counterterrorism Center and a supervisor of a secret facility in Thailand. While she was there, the CIA subjected one detainee to waterboarding.

Haspel has said she drafted a cable authorizing the destruction, which was sent by her boss, former operations director Jose Rodriguez, in 2005. But Haspel claims she believed that Rodriguez would first get permission from the CIA director and its top lawyer before dispatching the cable. Rodriguez has said publicly that Haspel knew he intended to take the matter into his own hands and issue the order, because he believed he had the authority to do so.

But she stressed in her written answers that she has, over her 33-year career, crossed her superiors before, delivering “unwanted news to CIA directors, Cabinet secretaries and the president.”

Haspel also wrote that Iran has “continued to substantially meet” the commitments it made under the nuclear deal that, Trump announced last week, the United States intends to abandon.

Karoun Demirjian is a congressional reporter covering national security, including defense, foreign policy, intelligence and matters concerning the judiciary. She was previously a correspondent based in The Post's bureau in Moscow.