San Diego's mayor was a star witness in the trial on the constitutionality of California's ban on gay marriage.
The trial began its second week Tuesday. In the non-jury trial, U.S. District Judge Vaughn Walker will rule whether denying homosexuals the right to marry violates their constitutional rights.
Mayor Jerry Sanders, a Republican, now supports gay marriage. He said his views evolved after learning one of his daughters was a lesbian who wanted to marry her partner.
"I believe the government should allow everyone to get married in exactly the same way," Sanders said.
Sander's said he had been prejudiced, adding he had been was saying same-sex marriages "were less important than those of heterosexuals."
During testimony, Sanders recounted his last-minute decision in 2008 to sign a City Council resolution backing efforts to legalize same-sex marriage.
The decision contradicted a campaign promise and his public pledge of a veto.
Sanders was shown a videotape of the news conference where he broke down in tears while announcing his reasons for changing his mind.
"I felt I came very close to making a bad decision," he said. "I came very close to showing the prejudice I obviously had toward my daughter to my staff and to the people of San Diego."
Mayor Sanders was questioned by San Francisco City Attorney Dennis Herrera.
Herrera got the gig because the city of San Francisco is part of the case because it claims denial of marriage is costly to local governments.
Sanders also testified he thinks Prop. 8 has a discriminatory intent.
He said the law tells gay people, "We don't think that you folks have the same type of relationship or love each other as much, so we're not going to allow you to be married."
Sander's cross-examination by lawyer Brian Raum focused on allegations that same-sex advocates stole campaign signs, defaced a church and assaulted Prop. 8 donors. Sanders said he did not have any firsthand information about the allegations.
Sanders and his daughter Lisa Sanders talked to reporters following his testimony.
He admitted to choking up at times Tuesday. "It's an emotional issue," Jerry Sanders said.
Lisa Sanders said, "It's important that we're all created equal and treated equally."
Andrew Pugno, a lawyer for sponsors of Proposition 8, also talked to the press after court. He said Sanders' testimony, while heartfelt, was "legally irrelevant."