California's highest court on Monday barred doctors from invoking their religious beliefs as a reason to deny treatment to gays and lesbians, ruling that state law prohibiting sexual orientation discrimination extends to the medical profession.

The ruling was unanimous and a succinct 18 pages, a contrast to the state Supreme Court's 4-3 schism in May legalizing gay marriage.

Justice Joyce Kennard wrote in the ruling that two Christian fertility doctors who refused to artificially inseminate a lesbian have neither a free speech right nor a religious exemption from the state's law, which "imposes on business establishments certain antidiscrimination obligations."

In the lawsuit that led to the ruling, Guadalupe Benitez, 36, of Oceanside said that the doctors treated her with fertility drugs and instructed her how to inseminate herself at home but told her their beliefs prevented them from inseminating her. One of the doctors referred her to another fertility specialist without moral objections and Benitez has since given birth to three children.

Nevertheless, Benitez in 2001 sued the Vista-based North Coast Women's Care Medical Group. She and her lawyers successfully argued that a state law prohibiting businesses from discriminating based on sexual orientation applies to doctors.

The law was originally designed to prevent hotels, restaurants and other public services from refusing to serve patrons because of their race. The Legislature has since expanded it to cover characteristics such as age and sexual orientation.

"It was an awful thing to go through," Benitez said. "It was very painful — the fact that you have someone telling you they will not help you because of who you are, that they will deny your right to be a mother and have a family."

Benitez has given birth to three children through artificial insemination — Gabriel, 6, and twin daughters, Sophia and Shane, who turn 3 this weekend. She is raising them in Oceanside with her longtime partner, Joanne Clark.

Jennifer Pizer, Benitez's attorney, said the ruling was "a victory for public health" and that she expected it to have nationwide influence.

"It was clear and emphatic that discrimination has no place in doctors' offices," Pizer said.

Robert Tyler, one of the lawyers representing the clinic, said the ruling advanced the Supreme Court's "radical agenda" and would help the campaign supporting November's Proposition 8, which seeks to once again ban gay marriage in California.

"The Supreme Court's desire to promote the homosexual lifestyle at the risk of infringing upon the First Amendment right to free exercise of religion is what the public needs to learn about," said Tyler, who leads the nonprofit Advocates for Faith and Freedom in Murrieta, Calif. "This case will have a direct impact and cause people and look very favorably at Proposition 8."

The Supreme Court did order a trial court to consider whether the Christian doctors were allowed to refuse inseminating Benitez because she was unmarried. The Legislature in 2006 amended the law to bar discrimination based on marital status, but it's unclear whether the doctors could legally withhold treatment in 2000.

The case drew numerous friends of the court briefs from a wide variety of religious organizations, medical groups and gay civil rights organizations.

The American Civil Rights Union supported the Christian doctors, siding with the Islamic Medical Association of North America, the Christian Medical & Dental Associations and anti-abortion groups.

The California Medical Association reversed its early support of the Christian doctors after receiving a barrage of criticism from the gay rights community, joining health care provider Kaiser Foundation Health Plan to oppose the Christian doctors.

The American Civil Liberties Union, California Attorney General Jerry Brown, the National Health Law Program and the Gay and Lesbian Medical Association filed papers backing Benitez.