A federal judge in Alexandria has ruled that American Airlines illegally discriminated against stewardesses by requiring that they take an unpaid leave of absence as soon as they learn that they are pregnant.

But U.S. District Court Judge Albert B. Bryan Jr. also ruled that the airline's refusal to provide sick leave, disability payments, and full health benefits to pregnant employees is not in violation of the 1964 Civil Rights Act.

Judge Bryan based that part of his opinion on a December U.S. Supreme Court ruling in which the Court decided that employers may legally exclude pregnancy benefits from company disability insurance programs.

Attorneys for the flight attendants said yesterday that Judge Bryan's decision would likely result in the airline having to make up the lost pay to the affected employees. This is estimated at between $2 million and $3 million.

Judge Bryan's decision is in contrast with a ruling by the Fourth U.S. Circuit Court of Appeals in Richmond in which the court decided that the cause of passenger safety is served by the airline's refusal to allow pregnant flight attendants to continue to fly.

That case involved a class action suit brought by Karen Condit, a stewardess for United Air Lines, who argued that flight attendants should be permitted to work so long as they can perform their duties.

Lawyers familiar with both decision said that in the United Air Lines case the airline had convinced the court of the direct connection between its maternity policy and passenger safety. Judge Bryant, by contrast, said in his opinion that he was not so convinced.

Judge Bryan said that American's so-called "leave-upon-knowledge" rule has an adverse effect on women because no male employee is ever denied an employment opportunity if he is physically able to continue working.

Attorneys representing the airline argued that their foremost consideration was the safety of the passengers and pointed out that the normal symptoms of pregnancy could conceivably prevent a flight attendant from performing her duties during an emergency.

Eugene Webb, one of the attorneys representing American, said a statistical study had indicated that pregnant Western Airlines flight attendants suffered spontaneous abortions at twice the rate of pregnant ground personnel.

But Judge Bryan wrote in his opinion that the importance of physical strength and capacity of the flight attendants when performing safety functions was minimized by both the Federal Aviation Administration and the airlines themselves.

Pointing out that FAA regulations deal extensively with all aspects of the qualifications for flight crews, Judge Bryan said this "stands in sharp contrast to the minimal FAA qualifications for the position of flight attendant."

"Significantly," Judge Bryan continued, "the FAA does not require any periodic medical examinations of flight attendants while mandating twice-yearly check-ups for flight crew members."

The judge said that in a normal, doctor-supervised pregnancy the risk of spontaneous abortion or uncapacitating nausea and other symptoms "is so remote as to be neligible."

On the matter of passenger safety, Judge Bryan said he realized the responsibility carriers have in this respect, but added: "The incantation of a safety rationale is not an abracadabra."

The judge said each case should be examined on all individual basis and that "on the infrequent" occasion of divergent medical opinions the final say should go to the airline.

The opinion, released yesterday, was a result of a class action suit brought against the airline by two employees, Louise Miliotes and Linda Timberlake. They alleged that the practice of mandatory maternity leave and lack of medical and other benefits violated Title VII of the 1964 Civil Rights Act prohibiting job discrimination based on sex.

Webb, one of the attorneys for American Airlines, said he did not know if the carrier planned to appeal the decision.