A feisty 3-year-old girl who made medical history with a five-organ transplant died after a six-month struggle that doctors say will help advance research into the experimental surgery.

Tabatha Foster of Madisonville, Ky., who spent most of her life in hospitals, died Wednesday afternoon, a month shy of her fourth birthday, in the intensive care unit at Children's Hospital of Pittsburgh.The 36-pound, pigtailed child was the world's longest survivor of a five-organ transplant. She received a new liver, small intestines, pancreas and parts of a stomach and colon during a 15-hour experimental operation that ended Nov. 1.

Similar procedures had been performed only twice before in the world, and both patients died within a few days.

An infection in Tabatha's bloodstream caused her heart, kidneys and liver to fail, said hospital spokeswoman Sue Cardillo. "It was system failure, everything. It was like a chain reaction," she said.

Among those expressing sympathy was President Reagan, who had mentioned Tabatha's plight in a national radio address in January and contributed $1,000 toward her medical expenses.

"Many Americans were drawn to her because of her courageous battle against birth defects. We extend our deepest sympathies to her family," the president said in a statement.

Tabatha's parents, Roy and Sandra Foster, were at her side and had told doctors not to try to revive her if her heart stopped, Cardillo said.

"I was a little surprised that it ended as suddenly as this," said Dr. Thomas E. Starzl, director of transplant surgery at Children's Hospital. "Even though she was a child of enormous physical and enormous emotional strength, it was just slowly ebbing away."