Undated (AP) _ A woman dying of a congenital heart defect was given an artificial heart in an operation that ended early today, and a man who lived for four days on an artificial heart left surgery today with a donor human heart.

The 40-year-old woman was not identified at the request of her family, said Jan Rooney, a spokeswoman for University Medical Center at Tucson, Ariz.

Ms. Rooney quoted Dr. Jack Copeland, who headed the implant team, as saying there were no major complications during the nearly nine-hour operation and that the woman was doing well. The mini-Jarvik mechanical heart was intended to keep the woman alive only until she is well enough for a transplant, she said.

Ms. Rooney said the woman suffered from Epstein's anomaly, in which the right side of the heart is malformed and the right valve does not function.

In Milwaukee, Ronald L. Smith, 38, of Gary, Ind., was listed in critical but stable condition after his artificial heart was replaced by a transplant in 3 1/2 hours of surgery at St. Luke's Hospital.

Diane De La Santos, director of public relations at the hospital, said the operation went smoothly. The heart's donor was described only as a young man from Michigan.

Smith had suffered from cardiomyopathy, a degenerative disorder that destroyed his own heart and forced doctors to implant a Jarvik-7 artificial heart Friday.

Dr. Alfred Tector, who headed the surgical team, said that because Smith was on the mechanical heart, he had been given a high priority for a transplant organ in the nation's central computing agency that matches donors with recipients.