A San Francisco man whose writings linked homosexuality to pedophilia and prostitution took center stage Thursday in the trial over California's ban on same-sex marriage, with supporters and opponents of Proposition 8 disputing his role in the campaign.

William Tam, director of the Traditional Family Coalition, was one of five official proponents of Prop. 8, the November 2008 initiative that amended the state Constitution to define marriage as the union of a man and a woman.

Plaintiffs challenging the measure hope to use his incendiary statements to show that Prop. 8, promoted as a reaffirmation of traditional marriage, was based on anti-gay prejudice and stereotypes and was therefore unconstitutional.

In a message to supporters during the campaign, for example, Tam wrote that "other states would fall into Satan's hand" if same-sex marriage remained legal in California. San Francisco's government, "under the rule of homosexuals," would next move to legalize sex with children and prostitution, he said.

Tam affirmed those statements in a San Francisco federal courtroom Thursday. He said he also believes, based on European nations that have allowed same-sex marriage, that it is a forerunner to legalized incest and polygamy, all signs of "the moral decay of a liberal country."

But he equivocated on how closely he had worked with the official Yes on 8 campaign, a coalition of religious and conservative groups called Protect Marriage.

Questioned by David Boies, a lawyer for two same-sex couples challenging Prop. 8, Tam said Protect Marriage had invited him to be an official proponent, told him to take part in a televised debate, counseled him on what to say, and wrote a declaration he signed saying he had supervised preparation of the text of the ballot measure.

He collected signatures, organized rallies and raised money for the campaign in the Asian American community, stayed in contact with Protect Marriage leaders and signed a "statement of unity" in July 2008 promising to coordinate all messages with the campaign committee, Tam said. He added that he later violated the pledge on two occasions.

"I was playing a major role" in the Prop. 8 campaign, he said.

But when questioned by Protect Marriage lawyer Nicole Moss, Tam said he "was acting independently" during the campaign.

He worked closely with Protect Marriage while gathering about 20,000 signatures for the ballot measure, he said, but played no part in drafting Prop. 8 or developing the committee's strategy or campaign messages.

Despite the "pledge of unity," Tam said, he never submitted any of his own messages to the campaign manager for advance approval, and Protect Marriage had no control over communications by the Traditional Family Coalition.

Protect Marriage has tried to exclude or limit evidence of Tam's statements, but Chief U.S. District Judge Vaughn Walker, who is hearing the case without a jury, allowed the evidence, citing Tam's status as an official sponsor of Prop. 8.

Walker has not said, however, how he will consider Tam's statements in determining the purpose of Prop. 8, a potentially crucial factor in determining its constitutionality.

The plaintiffs plan to wrap up their case today, the end of the trial's second week. Protect Marriage has withdrawn all but two of its scheduled witnesses - citing Walker's order, which was later overruled by the Supreme Court, to televise the trial to other federal courthouses - and is expected to conclude its case by early next week.