Presidential candidate Hillary Rodham Clinton was asked during Tuesday's Democratic debate whether her support for marriage equality was politically motivated.

Clinton endorsed same-sex marriage in a 6-minute video released in 2013 for the Human Rights Campaign's (HRC) Americans for Marriage Equality campaign. Previously, she backed civil unions for gay and lesbian couples.

During Tuesday's CNN debate, moderator Anderson Cooper asked Clinton whether she will “say anything to get elected?”

“Plenty of politicians evolve on issues, but even some Democrats believe you changed your positions based on political expediency,” Cooper stated.

“You were against same-sex marriage. Now you're for it. You defended President Obama's immigration policies. Now you say they're too harsh. You supported his trade deal dozens of times … Now, suddenly, last week, you're against it. Will you say anything to get elected?” Cooper asked.

Clinton insisted that her positions are “consistent” with her values.

“I've always fought for the same values and principles,” Clinton responded. “Like most human beings, including those who run for office, we do absorb new information.”

“Like most people I know, I have a range of views, but they are rooted in my values and experiences,” she later added.

During an NPR interview last year, Clinton became defensive when asked a similar question.

(Related: Hillary Clinton annoyed as Terry Gross tries to pin down her views on gay marriage.)