Testimony ended Wednesday in a historic federal case challenging the constitutionality of California’s ban on same-sex marriage.

The trial included nearly 12 days of wide-ranging testimony on the meaning of marriage, the nature of sexual orientation, and the role of religion in shaping attitudes about both.

Chief U.S. District Judge Vaughn R. Walker heard the case without a jury and has said he will take time to review the evidence before hearing closing arguments, probably sometime in March.

His verdict is likely to be eventually appealed to the U.S. Supreme Court.

Lawyers for the sponsors of Proposition 8. the state’s voter-approved ballot measure, have asked Walker to reserve their option to present more documents based on subpoenas they have issued to gay rights groups that opposed the measure.

The defense called just two expert witnesses during the trial. More than a dozen witnesses appeared for the plaintiffs, including sociologists, legal experts and gays who talked about the effect of the ban on their lives.

Lawyers for the two gay couples that filed the lawsuit tried to show the U.S. Supreme Court has recognized marriage as a fundamental right and that denying gays the right to wed causes them harm

They also argued that extending marriage to same-sex couples would not undermine heterosexual unions.

Plaintiffs lawyer David Boies said Walker had been provided with more than enough evidence to strike down the ban.

``We said on the first day of trial we would prove three things,’’ he said during a news conference outside court. ``Marriage is a fundamental right, that depriving gays and lesbians the right to marry hurts them and hurts their children; and there was no reason, no societal benefit in not allowing them to get married.’’

The defense countered that limiting marriage to a man and a woman serves a paramount social function that outweighs civil rights concerns.

Andy Pugno, a lawyer representing Proposition 8 backers, credited the plaintiffs with ``putting on a spectacular show’’ but insisted much of their testimony was irrelevant to proving California voters acted irrationally in approving Proposition 8.

``To invalidate people’s vote, the plaintiffs have a really tough job,’’ Pugno told reporters. ``They have to prove the people voted irrationally when they voted to preserve the traditional definition of marriage ... The question is whether the people have a right to decide what is best.’’

The last witness to testify was David Blankenhorn, president of the New York-based Institute for American Values, who said the rights of same-sex couples should come second to preserving the cherished social institution of marriage.

Under cross-examination, Blankenhorn conceded there were 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.