WASHINGTON — CIA director-nominee Gina Haspel, who ran a secret CIA prison after 9/11 where a detainee was tortured, asserted for the first time publicly Tuesday that the CIA's program of brutal interrogations was a mistake that "ultimately did damage to our officers and our standing in the world."

Haspel's significant new statement, in a letter to the ranking Democrat on the Senate intelligence Committee, Sen. Mark Warner of Virginia, all but assures that she will be confirmed, Senate aides said.

Shortly after the letter was released, Warner announced he would vote for Haspel. He said he had found Haspel to be "more forthcoming regarding her views on the interrogation program" in one-on-one meetings and in a closed door session before the committee, and had asked her to "memorialize those comments in writing."

Sen. Heidi Heitkamp, D-N.D., and Sen. Bill Nelson, D-Fla., also announced after the release of the Haspel letter Tuesday that they would support her nomination.

In newly released written answers, Haspel also said she learned lessons from an infamous mistake by the agency — the wrongful kidnapping of Khalid al-Masri, a German citizen who was abducted in Macedonia and tortured, he says, in a secret CIA prison in Afghanistan. Other terror suspects were kidnapped by the CIA during that period using a flawed legal justification, Haspel acknowledged, without explicitly detailing what her role was in the so-called renditions.

Haspel also affirmed in her written answers that the CIA believes Iran is complying with the nuclear deal that President Donald Trump withdrew from, and that she agrees with the intelligence assessment that Russia interfered with the 2016 presidential election. She promised to cooperate fully with special counsel Robert Mueller's investigation into that matter.

Asked whether Trump has insisted that she pledge her loyalty to him, Haspel answered, "No."

In the letter to Warner on brutal interrogations, Haspel took a stand that she repeatedly declined to take during her confirmation hearing, when she was asked over and over to pass judgment on a CIA program that many believe was a departure from American values. She avoided answering, saying instead that she supports the current law banning brutal interrogations across the U.S. government.

"While I won't condemn those that made these hard calls, and I have noted the valuable intelligence collected, the program ultimately did damage to our officers and our standing in the world," Haspel wrote in the letter. "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."

CIA-director nominee Gina Haspel at her confirmation hearing before the Senate Select Intelligence Committee on May 9. Brendan Smialowski / AFP - Getty Images

She told senators something similar during her testimony in closed session last week, two people who were present for her testimony told NBC News. But Haspel had wanted to avoid saying it publicly, for fear of impugning the many people who still work at CIA who had some involvement with the post 9/11 program.

Warner and other Democrats wanted to hear her say it publicly, and now they have.

Haspel also told Warner in the letter that it "was a mistake not to brief the entire committee at the beginning" of the interrogation program. That was also a significant statement, because former CIA officers who have defended the torture program have commonly argued that Congress was briefed and had no problem with it. In fact, the 2014 Senate report suggests that the early briefings — to a small group of congressional leaders — were inaccurate and incomplete.

"CIA needs to have consensus from members of the oversight committees who make decisions on behalf of the American people as their elected representatives on activities that can't be made public," Haspel wrote.

Haspel's letter came as senators were reviewing a classified memo, prepared by the Democratic staff of the Senate Intelligence Committee, that includes details about the CIA's interrogation program that some senators and aides have found disturbing, four people familiar with the document told NBC News.

The document, which has been made available to senators and cleared aides, describes Haspel's role in the CIA's post-9/11 torture program, citing cable traffic and internal CIA messages that were not discussed in her public confirmation hearing.

The sources, some of whom support Haspel and some of whom do not, say the document describes comments by Haspel in support of the CIA's brutal interrogation program at the time it was ongoing.

In the letter, Haspel said she would "refuse to undertake any proposed activity that is contrary to my moral and ethical values."

"As I was able to describe in detail during the classified session, in my role as deputy and now acting director, every operation I review must not only meet those high standards, the activity must also be consistent with CIA's mission, expertise and the law," Haspel wrote. "I do not and would not hesitate to reject a proposal that fails to meet this threshold."