California's high court on Monday barred doctors from withholding medical care to gays and lesbians based on religious beliefs, ruling that state law prohibiting sexual orientation discrimination extends to the medical profession.

Justice Joyce Kennard wrote in the unanimous 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 anti-discrimination 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 assisting her further.

The case drew the attention 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 all filed papers backing Benitez.

Monday's ruling came after the California Supreme Court ruled 4-3 in May to legalize gay marriage.