SAN FRANCISCO -- A Harvard professor testifying in a case challenging California's gay marriage ban said Tuesday that procreation is historically not the only function of marriage.

In her second day of testimony, Nancy Cott, a U.S. history professor and the author of a book on marriage as a public institution, disputed a statement by a defense lawyer that states have a compelling interest to restrict marriage to heterosexual couples for the sake of procreation.

Cott said marriage also has served an economic purpose, with each spouse doing different jobs in the partnership. As the purposes of marriage have changed, the reasons to bar same-sex couples from marrying have gone away, she said.

"It seems to me that by excluding same-sex couples from the ability to marry and to engage in this institution, that society is actually denying itself another resource for stability and social growth," she said.

Cott conceded under cross-examination that she couldn't predict the consequences for society of same-sex marriage.

The lawsuit -- brought by two same-sex couple unable to marry because of California's Proposition 8 -- is the first in a federal court to decide the constitutionality of state bans on gay marriage.

Chief U.S. District Judge Vaughn R. Walker is presiding over the case without a jury.

Regardless of the outcome, the case is likely to be appealed to the U.S. Supreme Court, where it could lead to laws that restrict marriage to a man and a woman being upheld or abolished nationwide.

The expert testimony marked a change in tone from the trial's first day, when the plaintiffs gave intimate accounts of their private and public lives, at times tearfully testifying about moments of awkwardness, disappointment and shame that they said resulted from their inability to legally wed.

"I've been in love with a woman for 10 years, and I don't have access to a word for it," said 45-year-old Kristin Perry of Berkeley, the lead plaintiff. "In a store, people want to know if we are sisters or cousins or friends, and I have to decide every day if I want to come out wherever we go, if we are going to risk that negative reaction."

Perry and her partner, Sandra Stier, 47, and a gay couple from Los Angeles, Paul Katami, 37, and Jeffrey Zarrillo, 36, were the first witnesses.

On Monday, their noted conservative litigator Theodore Olson quoted the U.S. Supreme Court's own lofty description of matrimony to demonstrate what his clients were being denied.

"In the words of the highest court in the land, marriage is the most important relationship in life and of fundamental importance to all individuals," said Olson, who represented George W. Bush during the Florida recount in 2000 and later served as his solicitor general.

Charles Cooper, who is representing Proposition 8 sponsors, said in his opening statement that Proposition 8 was motivated not by "ill-will nor animosity toward gays and lesbians, but special regard for the institution of marriage."

"It is the purpose of marriage -- the central purpose of marriage -- to ensure, or at least encourage and to promote that when life is brought into being, it is by parents who are married and who take the responsibility of raising that child together," he said.