Peter Magowan, who in 1992 — decades after he had watched the New York Giants play at the Polo Grounds as a boy — led a group that bought the team to keep it from relocating to Florida from San Francisco, died on Sunday at his home in San Francisco. He was 76. His wife, Deborah, confirmed his death. Mr. Magowan had liver and prostate cancer and had had a liver transplant. Mr. Magowan had been the chief executive of Safeway Stores, the nation’s largest supermarket chain, when Bob Lurie, the Giants’ owner, made a deal with investors in the St. Petersburg-Tampa area in August 1992 to move the team there. Very quickly, a group of local investors, led by Mr. Magowan, assembled a $100 million bid to keep the team in San Francisco, where the Giants had moved from New York 35 years earlier. Under Mr. Magowan, who was the team’s managing general partner for nearly 16 years, the Giants’ image was recast. In late 1992 he signed the superstar slugger Barry Bonds to a six-year, $43.75 million contract, then the richest in baseball history. He brought back Willie Mays, the franchise’s incandescent superstar, in a lifetime role — he had not had a formal position with the team since before he retired in 1973 — and other former players returned in various capacities. Mr. Magowan’s most significant achievement was building Pacific Bell Park (now called Oracle Park), a waterfront stadium that replaced windy, decrepit Candlestick Park, the team’s home since 1960. Peter Alden Magowan was born on April 5, 1942, in Manhattan. His mother, Doris (Merrill) Magowan, was a daughter of Charles Merrill, a founder of the Merrill Lynch brokerage firm. His father, Robert, worked at Merrill Lynch before he joined Safeway Stores in the early 1950s and took over as chairman in 1955. Mr. Merrill had been a large investor in Safeway and recommended that Robert Magowan become the chain’s chief executive. Peter’s path to Safeway was indirect. He earned a bachelor’s degree in American literature at Stanford University and a master’s in politics, philosophy and economics at Oxford University in England before finishing two years of undergraduate work at the Johns Hopkins School of Advanced International Studies in Baltimore. But his education, and two summers at the State Department, did not provide the direction he wanted. So he went to work for Safeway, where he was a checker, shelf stocker and produce clerk before being given greater responsibility as a store manager, district manager, retail operations manager and regional vice president. At 37, he became Safeway’s chairman and chief executive. Mr. Magowan’s tenure at Safeway, he fended off a hostile takeover bid in 1986 from the Dart Group Corporation by agreeing to a $4.25 billion leveraged buyout from Kohlberg Kravis Roberts & Company. The buyout left Safeway’s management in place but saddled the company with enormous debt; it eventually eliminated 63,000 jobs. Mr. Magowan is survived by his wife, Deborah (Johnston) Magowan; his daughters, Kimberley Wagner, Margot Garvin, Hilary Malko and Kristen Butt; a son, Matthew Cook; 13 grandchildren; and his brothers, Robin, Merrill and Mark. His first marriage, to Jill Tarlau, ended in divorce.