At a marquee event on Saturday one hundred days before the Iowa caucuses, Bernie Sanders went after Hillary Clinton’s record on gay rights.

With Clinton waiting nearby, Sanders blamed her for supporting the 1996 Defense of Marriage Act, which barred federal recognition of gay marriage, arguing that she is now misleading the public about her past views when she says that she only supported the law to prevent a constitutional amendment.

“Today, some are trying to rewrite history by saying they voted for one anti-gay law to stop something worse,” Sanders told a group of top Democratic organizers, without saying Clinton’s name. “That’s not the case! There was a small minority opposed to discriminating against our gay brothers and sisters, and I am proud that I was one of those members!”

With both Democratic contenders mostly in agreement on the topic today, the Vermont Senator is criticizing the former Secretary of State’s past positions, attempting to tie them to a broader critique that she does what is politically expedient.

By all measures, Sanders was ahead of his time in supporting gay rights. In 1983, as mayor of Burlington, he signed a Gay Pride Day proclamation calling it a civil rights issue. He was one of just 67 members in the House of Representatives to vote against the Defense of Marriage Act, a politically tough decision he prides himself on and points to as a key progressive bona fide. Sanders opposed Don’t Ask Don’t Tell in 1993, another President Bill Clinton-era policy, and supported civil unions in Vermont in 2000.

“I’m not evolving when it comes to gay rights. I was there,” Sanders told the New York Times earlier this year.

But his record on gay marriage is more complicated than he now makes it sound. While Sanders generally opposed measures to ban gay marriage, he did not speak out in favor of it until 2009. That’s still ahead of Clinton, who released a YouTube video announcing her support in 2013, as well as most other Democratic Senators, but not as early as he’s now casting it.

In addition, his reasoning for opposing efforts to restrict gay marriage was much narrower and legalistic than he now makes it seem.

When Sanders was asked on Sunday about his vote against the Defense of Marriage Act on CNN, he said that he believed back in 1996 that gay couples had the right to gay marriage. “I thought then and I think now that people have the right to love those folks that they want to love and get married regardless of their sexual orientation,” he said.

That wasn’t the answer his staff gave in 1996, however. His wife and chief of staff Jane Sanders told an Associated Press reporter in July of 1996 that he opposed the law because it weakened the section of the Constitution that says states must respect laws that are made in other states.

“We’re not legislating values. We have to follow the Constitution,” Jane Sanders said. “And anything that weakens the Constitution should be (addressed) by a constitutional amendment, not by a law passed by Congress.”

In 1999, the Vermont Supreme Court ruled that the state had to guarantee protections and benefits to gay couples, a stop short of legalizing gay marriage. Sanders approved of the decision.

“The Vermont Supreme Court has unanimously ruled that under the Vermont Constitution, all citizens of the state have the same right to the benefits of marriage,” Sanders said at the time. “I applaud that decision. Vermont has once again shown itself to be a leader in the struggle for human rights.”

But the court also said that the Vermont legislature should decide the issue. Many prominent Democrats, including Sanders’ successor as mayor of Burlington and a gubernatorial nominee, spoke out in favor of gay marriage, but Sanders kept mum.

Peter Freyne, a locally beloved Vermont writer and opinion writer whom Sanders later lauded as “the best political reporter in the state of Vermont,” accused the then-Congressman of obfuscating on his gay rights position.

“Obtaining Congressman Bernie Sanders’ position on the gay marriage issue was like pulling teeth … from a rhinoceros,” Freyne wrote. Freyne described repeated attempts to hear Sanders’ views on gay marriage, and the congressman only said he “supports the current process” in the state legislature. Though Sanders was not in the Vermont state legislature at the time, it was a hot topic in his home state at the time.

“It’s an election year, yet despite the lack of a serious challenger, The Bern’s gut-level paranoia is acting up,” Freyne wrote.

In 2006, when the Bush White House proposed an amendment to the Constitution defining marriage as between a man and a woman, Sanders spoke out against the Republican plan, saying it was “designed to divide the American people.”

Read More: The Gospel of Bernie

But when Sanders was asked by a reporter whether Vermont should legalize same-sex marriage, he said no. “Not right now, not after what we went through,” he said.

That same year, Sanders was asked in a debate during his first run for the Senate about a Massachusetts state court decision that legalized gay marriage. The debate moderator wanted to know if Sanders thought the federal government should overturn that decision. He responded by talking about states’ rights, which is an argument often used by politicians who have argued against federal recognition of gay marriage as well.

“I believe the federal government should not be involved in overturning Massachusetts or any other state because I think the whole issue of marriage is a state issue,” Sanders said in the 2006 debate.

It wasn’t until 2009 that Sanders publicly voiced support for gay marriage, years after many of his contemporaries in Vermont. The state legislature voted to legalize gay marriage that March and overrode a gubernatorial veto to pass it into law in April. It’s unclear when exactly Sanders took his position. When asked, his campaign provided a news article from July of that year which noted that he had “previously supported” it.

But a Sanders’ campaign spokesman, Michael Briggs, stressed that he has a “long and consistent record on gay rights.” He pointed to a YouTube video showing Sanders taking a fellow member of Congress to task over Don’t Ask Don’t Tell in 1995.

“You said something about ‘homos’ in the military,” Sanders said. “Was the gentleman referring to the many thousands and thousands of gay people who have put their lives on the line in countless wars defending this country? Is that the group of the people the gentleman was referring to? You used the word homos. You have insulted thousands of men and women who have put their lives on the line. I think you owe them an apology.”

Read Next: Sanders Goes on Offense Against Clinton in Key Iowa Dinner

Contact us at letters@time.com.