DETROIT — Michigan’s nearly decade-old ban on gay marriage is going to trial Tuesday, with two weeks set aside for testimony from experts about whether there’s a legitimate state interest in restricting marriage to a man and a woman.

Same-sex couples last fall had lined up for marriage licenses across Michigan, only to be stunned when U.S. District Judge Bernard Friedman said he wanted to hold a trial. Since then, judges in Utah, Oklahoma and Virginia have struck down bans on gay marriage.

In Michigan, two Detroit-area nurses are challenging the state’s ban, which was approved in 2004. They sued in 2012 to try to overturn a law that bars them from adopting each other’s children, but the case was expanded at Friedman’s invitation to include same-sex marriage.

“If marriage is a fundamental right, then logic and emerging Supreme Court precedent dictate that the legitimacy of two adults’ love for one another is the same in the eyes of the law regardless of sexual orientation,” attorneys for April DeBoer and Jayne Rowse said in a court filing last fall.