Updated

SAN FRANCISCO — Legalizing gay marriage would provide a financial boost for San Francisco, the city's top economist said Thursday in a closely watched federal trial over California's same-sex marriage ban.

Edmund Egan, the city's chief economist, estimated that annual wedding-related spending would rise by $35 million in San Francisco, with an additional $2.7 million in hotel spending, if same-sex marriage were legal.

That would mean more than $2.5 million in additional city taxes, he calculated.

"San Francisco would see an increase in sales tax revenue and an increase in property tax revenue in the future," Egan added. "Married individuals tend to accumulate more wealth than single people."

In November 2008 California voters passed Proposition 8, a state constitutional amendment limiting marriage to a man and a woman. The ban came just months after the state Supreme Court had legalized same-sex marriage.

The federal case, which could produce a landmark ruling and lead to an overturning of similar bans in other states, began in San Francisco this month before U.S. District Court Chief Judge Vaughn Walker.

Supporters of the ban challenged Egan's financial estimates, arguing that a boom in weddings -- such as the one San Francisco experienced in the summer of 2008 when gay marriage briefly was made legal -- was unsustainable.

Egan also testified that married people pay lower federal taxes on average, freeing up money to spend in their home city, and they lead healthier lives.

Moreover, legalizing same-sex marriage would cut the city's cost of taking on discrimination cases, he said.

The federal challenge, focused on the idea that marriage is a constitutional right, could take years if it winds its way to the U.S. Supreme Court.