SAN FRANCISCO - Testimony ended Wednesday in a federal case challenging California's ban on same-sex marriage.

The trial is exploring whether states that deny gays and lesbians the right to wed are violating the U.S. Constitution.

Defence lawyers asked Chief U.S. District Judge Vaughn R. Walker to reserve their option to present more documents based on subpoenas they have issued to gay rights groups that opposed the measure.

The defence called just two expert witnesses. More than a dozen witnesses appeared for the plaintiffs.

Walker has said he wants to take several weeks to review all the evidence before hearing closing arguments, probably sometime in March.

Earlier in the day, the founder of a family values think-tank testified that the rights of same-sex couples should come second to preserving the cherished social institution of marriage.

David Blankenhorn, president of the New York-based Institute for American Values, said under cross-examination there are many valid reasons for allowing gays to wed, but the considerations are outweighed by the likely damage it would cause the already weakened state of heterosexual unions.

He acknowledged, however, that allowing gays to wed would have positive consequences for same-sex couples and society, such as scoring "a victory for the worthy ideas of tolerance and inclusion," reducing anti-gay prejudice and hate crimes, and creating a higher standard of living for same-sex couples.

"I do believe it is almost certainly true that gay and lesbian couples and their children would benefit from having gay marriage," he said.

Blankenhorn's testimony was almost certain to be cited by lawyers for the two gay couples suing to overturn the ban prompted by Proposition 8 in California.

They have contended that limiting marriage to a man and a woman hurts gay couples -- a key point in their argument against Proposition 8.