San Diego Republican Mayor Jerry Sanders provided emotional testimony Tuesday at the gay marriage trial now in its second week in San Francisco.

Sanders once opposed gay marriage, he freely admitted during the federal trial to decide the constitutionality of Proposition 8, the gay marriage ban approved by California voters in 2008, saying he believed civil unions were a “fair alternative.”

In 2007, when the San Diego City Council passed a resolution calling on the city to file an amicus brief in support of a San Francisco challenge to a gay marriage ban, Sanders was prepared to veto the measure.

Instead, the found himself giving an emotional press conference where he said he could no longer oppose gay marriage. He attributed his change of heart to the idea that “separate is not equal.” With his wife by his side, Sanders said: “I have close family members and friends who are members of the gay and lesbian community. Those folks include my daughter, Lisa.”

In testimony, he said he became very emotional because he realized that he “came very close to making a bad decision.” “I was discriminating against my own daughter,” he said.

Proposition 8 lawyer Brian Raum poked at Sanders' previous motivations for opposing gay marriage. He asked Sanders if he believed opponents were motivated by animus towards gays and whether it was wrong to suffer violence as a result of political views. But it was clear the defense was barking up the wrong tree.  Sanders repeatedly answered anti-gay views were based on prejudice, even if not motivated by hate.

In other testimony, University of Massachusetts economics professor Lee Badgett testified on the economic consequences of gay marriage.

“I don't think we need to wait any longer to see what the impact will be. I think we know,” Badgett said. “Everything I've looked at leads me to the conclusion that there is no impact.”

As with previous witnesses, defense lawyers attempted to discredit Badgett's professional credentials, asking her if she's a gay activist. Badgett admitted she contributed to the campaign against Proposition 8.

The trial resumes Wednesday.