Krista Contreras, left, and her wife, Jami Contreras, play with their 4-month-old daughter Bay in Oak Park, Mich. (Mandi Wright/Detroit Free Press via AP)

A Michigan pediatrician declined to treat the infant daughter of a lesbian couple in yet another example of the growing tensions between advocates for LGBT rights and those who want greater religious expression protections.

Krista and Jami Contreras were eager to bring their 6-day-old infant for her first doctor visit after her birth in October. The doctor that they had carefully chosen knew they were lesbians and after the first prenatal visit, they were under the impression that everything was fine. But the morning they arrived for the appointment after baby Bay’s birth, another doctor in the practice greeted them instead.

“The first thing Dr. Karam said was, ‘I’ll be your doctor, I’ll be seeing you today because Dr. Roi decided this morning that she prayed on it and she won’t be able to care for Bay,’ ” Jami told WJBK. “Dr. Karam told us she didn’t even come to the office that morning because she didn’t want to see us.”

[‘Relationship with Jesus’ doesn’t justify florist’s refusal to serve gay couple, judge rules]

In a handwritten letter to the couple months later, their would-be doctor Vesna Roi explained what happened.

“After much prayer following your prenatal, I felt that i would not be able to develop the personal patient-doctor relationships that I normally do with my patients,” Roi wrote in her letter on Feb. 9. “I felt that it was an exciting time for the two of you and I felt that if I came in and shared my decision it would take away much of the excitement. That was my mistake. I should not have made that assumption and I apologize for that.”

The incident has raised valid questions about whether Roi’s actions were justified, ethical or even legal.

“As far as we know, Bay doesn’t  have a sexual orientation yet so I’m not really sure what that matters,”  Jami added to WJBK. “We’re not your patient — she’s your patient. And the fact is that your job is to keep babies healthy and you can’t keep a baby healthy that has gay parents?”

[This Colorado baker refused to put an anti-gay message on cakes. Now she is facing a civil rights complaint.]

The answer is: It depends.

Ethically speaking, the American Medical Association takes a strong stance against denying care to people because of their sexual orientation — and it is reasonable to assume, the sexual orientation of their parents.

But their ethical guidance is just that: Guidance. Doctors aren’t bound by it.

“Respecting the diversity of patients is a fundamental value of the medical profession and reflected in long-standing AMA ethical policy opposing any refusal to care for patients based on race, gender, sexual orientation, gender identity or any other criteria that would constitute invidious discrimination,” said Gregory Blaschke, chair of the AMA’s LGBT Advisory Committee, in a statement to the Detroit Free Press.

But what about the legality of it all? Well, that depends, too.

There’s no federal law prohibiting doctors or any other service providers or merchants from refusing service to gay people. And in Michigan, there’s no state law prohibiting it either.

“There’s no law that prohibits it,” Wayne State University constitutional law Prof. Robert Sedler explained to the Free Press. “It’s the same as a florist refusing to sell flowers for a same-sex wedding.”

And while individual states have taken steps to ban the practice, Michigan is considering going in exactly the opposite direction.

[Some conservatives urging right not to serve gays on religious grounds]

A House bill that would allow adoption agencies to refuse placements based on moral or religious grounds is under consideration in the legislature. And last year, the Michigan House passed a controversial “religious freedom” bill, but it stalled in the Senate. The bill was introduced in the state Senate in this year’s legislative session in January.

Backers of Michigan’s “religious freedom” legislation, Michigan House Speaker James “Jase” Bolger, explained it to the The Post’s Sandhya Somashekhar this way:

He said he was compelled by the stories of business owners who have been punished for declining to participate in same-sex weddings, such as the couple in Upstate New York who provided their barn to gay couples for receptions but balked when asked to host a same-sex wedding ceremony. The couple was fined.

“I have been stunned at the number of Americans arguing that the only place people can practice their religion is while they’re hiding in their homes and hiding in their churches, and once they leave their home and their church they are not allowed to practice their religion,” Bolger said.

The wave of same-sex marriage legalization across the country has only emboldened conservatives to turn to legislative alternatives that would codify “religious freedoms” or their right to refuse service to gay people based on moral or religious beliefs.

Roi didn’t specify that Bay’s lesbian parents were the reason felt she couldn’t serve as her doctor. But the subtext was clear. And with no law prohibiting the practice, the couple has little choice but to accept it.

“When we started calling other pediatricians, my first thing on the phone was, we’re lesbian moms — is this okay with you?”  Krista told the Free Press.