San Diego Mayor Jerry Sanders, testifying Tuesday in a San Francisco courtroom, said he was propelled to change his position on same-sex marriage after his daughter told him she was a lesbian."My daughter deserves the same opportunity to have a wedding in front of family friends and co-workers -- to have that recognized lawfully," he testified, according to the San Jose Mercury News.Sanders took the stand in a federal trial involving the constitutionality of Proposition 8, the 2008 ballot measure that banned same-sex marriage in California.The Republican mayor was against gay marriage until December 2007 when he surprised many of his conservative supporters with a tearful announcement that he was reversing his position.Sanders joined the San Diego City Council in signing a legal brief asking the state's high court to overturn a prohibition on same-sex marriage. A subsequent ruling by the California Supreme Court briefly cleared the way for gay marriages, before they were once again banned with the passage of Proposition 8.Sanders testified Tuesday that the practice of prohibiting same-sex marriages was "grounded in prejudice.""If government tolerates discrimination against anyone for any reason, it becomes an excuse for the public to do the same thing," Sanders told the court, according to the Mercury News.Voters approved Proposition 8 in November 2008, just six months after same-sex marriage was legalized in the state. The plaintiffs in the federal case in which Sanders testified today are two couples who were denied marriage licenses under Prop. 8.The couples argue Prop. 8 violates the Equal Protection Clause of the 14th amendment of the U.S. Constitution.