The California Medical Association has withdrawn a controversial legal brief it filed supporting the rights of two doctors to argue that they could refuse on religious grounds to artificially inseminate a San Diego County lesbian.

The association is trying to file a new brief co-written by Kaiser Permanente lawyers that would argue almost the opposite. In it, they contend that neither Guadalupe Benitez's sexual orientation nor her marital status was medically relevant to whether her doctors were obliged to treat her.

"CMA does not condone invidious discrimination by physicians, including discrimination of patients based upon sexual orientation," the new brief states. "Further, CMA does not support a religious exemption to statutes prohibiting invidious discrimination."

But the clerk of the state's Fourth District Court of Appeal in San Diego has rejected the new document on the ground it was filed too late to be considered before oral arguments set for Oct. 11 over whether the doctors can claim a religious exemption in the case. Gay rights advocates plan to challenge the rejection of the new brief.

Medical association spokesman Peter Warren and association CEO Jack Lewin said they withdrew the first brief because it needed clarification, and because of a recent California Supreme Court ruling. The California Supreme Court ruled this summer that the state's civil rights law requires businesses to treat domestic partners like married people.

"CMA continues to believe that the defendant physicians deserve a right to due process and a jury trial," Lewin said in a statement released Tuesday. "However, it is clear that CMA's policy commitment to oppose any form of invidious discrimination had been so significantly confused and misrepresented, that it was in the best interest of CMA to withdraw the brief."

Attorneys and supporters of Benitez applauded the association's decision to withdraw the original brief.

They had criticized its contention that doctors have the right to argue in court that they can cite religious grounds in denying certain medical care to gays and lesbians, if that refusal was based on the patient's marital status.

"The CMA is affirming principles of nondiscrimination in health care that they have stood for for a long time," said Joel Ginsberg, executive director of the Gay and Lesbian Medical Association in San Francisco. "We are pleased to see them clarify their position and come out strongly against discrimination based on one's sexual orientation, gender identity or marital status."

Benitez's attorney said the medical association's initial brief was confusing.

"They've really abandoned the previous argument, and what's important is that this new brief is clear and understandable and consistent with the antidiscrimination policy that the California Medical Association and Kaiser Permanente have had for a long time," said Jennifer Pizer, senior counsel for the Western regional office of Lambda Legal, a group that specializes in gay and lesbian rights.

The new brief sets aside two exceptions to the argument against discrimination. The association argues that "physicians should not be liable for discriminating on bases that are medically relevant or for violating standards that were not established at the time of their actions."

Kaiser Permanente was not part of the original filing, and its attorneys did not return a call for comment.

Benitez's doctors argued in court documents that they should not have to treat Benitez because inseminating an unmarried woman contradicted their religious convictions, though they stated in other proceedings that Benitez's sexual orientation was their concern.

The new brief states that discrimination harms patients and society, and that legal and ethical standards prohibit physicians from invidiously -- or harmfully -- discriminating.

The new brief also states that physicians can treat patients differently based on medically relevant factors and can refuse to perform certain procedures on religious grounds, if they refuse such treatment for all patients.