Elizabeth Warren said she was wrong not to support taxpayer-funded transition-related surgery for transgender inmates.

"I think that was a bad answer,” the senior senator for Massachusetts and top-tier 2020 Democratic presidential candidate said during a CNN town hall focused on gay and transgender issues. “Everyone is entitled to medical care that they need.”

In 2012, Warren said the procedure was not "a good use of taxpayer dollars" during her first bid for the Senate. A federal court at the time ordered Massachusetts to provide sex change surgery to Michelle Kosilek, a convicted murderer, in one of the state's prisons. Her campaign in January began walking back the senator's comment in a statement, saying she endorsed "medically necessary services, including transition-related surgeries."

Warren's remarks Thursday night follow the release of her gay and transgender rights plan. Her proposal includes ending solitary confinement, monitoring compliance with the Prison Rape Elimination Act, prosecuting prison staff for misconduct, and offering sex change surgery, if deemed necessary.

"And I will direct the Bureau of Prisons to end the Trump Administration’s dangerous policy of imprisoning transgender people in facilities based on their sex assigned at birth and ensure that all facilities meet the needs of transgender people," she wrote.

Warren, who has closed the polling gap between her and longtime front-runner Joe Biden, earned laughs earlier in the program when asked how she would respond to a hypothetical voter in the South who asserted that marriage is only between a man and a woman.

"I'm going to assume it's a guy who said that, and I will say, then, just marry one woman," she said. "Assuming you can find one."