SAN FRANCISCO (AP) _ A woman with Down syndrome who was initially refused a heart-lung transplant because doctors didn't think she was smart enough to handle the aftereffects underwent the desperately needed operation Tuesday.

Sandra Jensen, 35, is believed to be the first seriously retarded person in the United States to receive a major transplant.

She was listed in critical but stable condition _ routine for transplant recipients _ after the five-hour operation, which came after Stanford Medical Center reversed course.

``I'm ecstatic. This is a miracle,'' said Dr. William Bronston, a state rehabilitation administrator and friend who helped lead the fight for Jensen's transplant. ``The struggle to get Sandra on the transplant list was really a struggle to get everyone in the country on the list.''

Jensen's mother, Kay DeMaio, of Elmira, Ore., was at her daughter's side before and after the operation. Her daughter will spend two to three weeks in the hospital, she said.

Jensen, a high school graduate who has worked on behalf of people with Down syndrome, has lived on her own for several years. She has acted as a spokeswoman for the mentally disabled in California and attended President Bush's signing of the Americans with Disabilities Act in 1990.

The Sacramento woman had congenital heart problems that became critical a year ago.

However, she was rejected for transplant surgery at both Stanford and the University of California at San Diego.

The surgery was not ``appropriate'' for a person with Down syndrome, Stanford wrote in a March 1995 letter. UCSD questioned whether she had the intelligence to follow through with the difficult post-operative regimen.

The hospitals relented after heavy lobbying and an offer from California's Medicaid program to pay for a full-time caretaker to make sure she takes her anti-rejection drugs, exercises as required and avoids strenuous activities. Medicare paid for the surgery and hospitalization, state health officials said, while Medicaid would pay for drugs and post-operation care. The cost was not immediately known.

``Their original decision was flawed, and they saw the flaw when they took another look and decided that Sandra Jensen's life is as important as any other life,'' said Frank Murphy, executive director of the National Down Syndrome Congress in Atlanta.

Dr. Bruce Reitz, who led the transplant team, said he still thinks most Down syndrome patients could not understand the required care after surgery. But he changed his mind about Jensen after meeting her.

``We found she was functioning at a very high level and could take care of her treatment,'' said Reitz.

With her operation, she has broken barriers for the disabled, said Remy Aronoff, deputy director of the transplant division at the U.S. Health and Human Services department in Washington.

``This is the first time this has come up in my nine years here,'' he said. ``And I think the fact that it's happened with her would make it far more difficult to turn down someone next time.''

The national disabled-rights magazine Mainstream, published in San Diego, took up Jensen's cause last year and encouraged readers to lobby for her.

``She was turned down because people didn't understand what her capabilities were,'' said publisher Cyndi Jones.

Down syndrome children are often given lower priority for expensive medical care because their life spans are short. But Jones said their life spans are short because they don't receive medical treatment.

``If she had the heart surgery she needed when she was an infant, then she wouldn't need the transplant now,'' Jones said.

Laws governing transplants and the handicapped fall into a gray area, said John Parry of the American Bar Association's Commission on Mental and Physical Disability Law.

``You can't say a person with Down syndrome or cancer or HIV can't have medical services,'' he said. ``But if you make rules that apply to large groups of people, and that happens to include those with Down syndrome, then that's permitted.''

Bronston said the real villain in Jensen's case was the organ transplant system, with 43,000 people on a waiting list for an annual total of only 5,000 organs. ``Something is gravely wrong,'' he said.

Jensen was on the transplant waiting list only four days before a match was found.

Jensen has B-positive blood, and there were only two people with that rare type ahead of her in Stanford's region. Both were too big for the organs from the available B-positive donor, who reportedly was a child.