A 58-year-old man with heart failure who received a new heart from a genetically modified pig died on Monday, nearly six weeks after receiving the pig organ, University of Maryland Medical Center officials announced on Tuesday.

Lawrence Faucette, of Frederick, Md., was the second patient at the medical center to have had an ailing heart replaced with one from a pig that had been genetically modified so its organs would be more compatible with a human recipient and would not be rejected by the human immune system.

The first patient, 57-year-old David Bennett, died last year, two months after his transplant. He had developed multiple complications, and traces of a virus that infects pigs were found in his new heart.

Both of the patients had terminal heart disease when they received the transplanted organs, and neither managed to recover sufficiently to leave the hospital. But while doctors said that Mr. Bennett did not show any signs of acute rejection of the new heart, which is the most significant risk in organ transplants, they said that Mr. Faucette’s transplanted heart had started to display some initial signs of rejection.

“We mourn the loss of Mr. Faucette, a remarkable patient, scientist, Navy veteran and family man, who just wanted a little more time to spend with his loving wife, sons and family,” said Dr. Bartley P. Griffith, the surgeon who performed the transplant at the University of Maryland Medical Center in Baltimore.

Mr. Faucette was very engaged in his own care, reading and interpreting his own biopsies, said Dr. Muhammad M. Mohiuddin, a professor of surgery and the scientific program director of the cardiac xenotransplantation program at the University of Maryland School of Medicine.

“Mr. Faucette’s last wish was for us to make the most of what we have learned from our experience, so others may be guaranteed a chance for a new heart when a human organ is unavailable,” Dr. Griffith said.

After the surgery, the transplanted heart performed well, with no signs of rejection during the first month, and Mr. Faucette was able to do physical therapy with the aim of regaining his ability to walk, according to a statement from the University of Maryland.

Like Mr. Bennett, the first patient to receive a pig’s heart, Mr. Faucette was rejected from transplant programs that use a traditional organ from a deceased human donor. He was too sick, suffering from advanced heart failure as well as peripheral vascular disease and other complications.

He was in end-stage heart failure on Sept. 14 when he was admitted to the University of Maryland Medical Center, and shortly before the surgery, his heart stopped and he had to be resuscitated.

His wife, Ann Faucette, said at that time that the couple was keeping expectations low, and hoping only for some more time to sit “on the front porch” and have coffee together.

After his death, Ms. Faucette said that her husband was a kind and selfless man who hoped his experience would help save lives by advancing the field of xenotransplantation, or the transplantation of organs or tissues from an animal source into a human recipient.

“He knew his time with us was short, and this was his last chance to do for others,” she said in a statement.

Transplant surgeons at a number of medical centers have been working fervently to advance the field of xenotransplantation. Most of the work so far has involved transplanting kidneys from genetically modified pigs into brain-dead patients being maintained on ventilators, in order to demonstrate that the kidneys can make urine and perform other essential biological functions without being rejected.

More than 100,000 Americans are living with end-stage organ disease, and there is an acute shortage of human donor organs. Most of those waiting for an organ need a kidney, but fewer than 25,000 kidney transplants are done each year and thousands die while on the waiting list.