SAN FRANCISCO -- Peter Magowan, the lifelong San Francisco Giants fan who formed the ownership group that kept the team in San Francisco with a sparkling waterfront ballpark, died Sunday after a battle with cancer. He was 76.

Magowan was a fan ever since going to games at the Polo Grounds in New York and then played a critical role in the team's success over the past quarter-century.

"During a tenuous period for the franchise, Peter stepped up and led the group that purchased the Giants and kept them in San Francisco," commissioner Rob Manfred said. "With groundbreaking vision, he then guided the effort that resulted in a ballpark that became a landmark for the city. In his 16 seasons of leadership, Peter oversaw a winning, civic-minded ballclub that represented the spirit of San Francisco. The foundation created under his direction helped make the Giants the model club they remain today."

Magowan helped form the ownership group that bought the franchise for $100 million from Bob Lurie in December 1992 to keep the team from moving to Tampa Bay. One of his first moves was signing Barry Bonds to a six-year, $43.5 million free agent deal even before he formally completed the purchase of the team.

In a tweet Sunday night, Bonds shared his thoughts on Magowan and what he meant to San Francisco.

I'm extremely saddened by the passing of Peter Magowan. I will never forget our first call about the possibility of me coming home to play. He saved baseball for San Francisco and will be greatly missed. Sending my love and prayers to Debby and family. I love you Peter Magowan. pic.twitter.com/eMHZkmtrz2 — Barry L Bonds (@BarryBonds) January 28, 2019

With the game's greatest slugger in place, the Giants went on to have great success and Magowan put together a plan to build a privately funded ballpark on the water in downtown San Francisco. That park, the first in years built without direct public funding, opened in 2000 and became one of the jewels of the game.

Magowan stepped down following the 2008 season but had put in place the management team that helped bring San Francisco its first World Series title in 2010, followed by championships in 2012 and 2014.

"Peter's mark on the Giants and the San Francisco community can be felt throughout the ballpark, in which he was intimately involved in the design and planning and throughout the daily operations of the organization," Giants president and CEO Larry Baer said. "He set forth a Giants vision to create a winning culture and to serve our fans and the community. Over the past 25 years, we have followed through on his vision and his impact on our community will be felt for decades to come."

Magowan moved to California in 1958, the same year the Giants relocated from New York to San Francisco. He had a successful business, working 37 years for Safeway Inc., including serving as chairman and CEO from 1980-93 before stepping down after taking over the Giants.

Former San Francisco Giants owner Peter Magowan, left, died Sunday at age 76. Magowan formed the group that kept the team from leaving San Francisco and put together the plan to build a new ballpark on the waterfront that opened in 2000. AP Photo/Eric Risberg

The Giants made the playoffs four times in Magowan's 16-year tenure running the Giants, including a trip to the World Series in 2002 before losing in seven games to the Angels.

Bonds also went on to set the single-season and career homer records during his tenure with the Giants, hitting 73 homers in 2001 and 762 in his career.

Magowan did significant work in the community, making the Giants the first professional sports team to dedicate an annual game to the fight against AIDS/HIV with the creation of "Until There's A Cure Day" in 1994. He also formed the Junior Giants program that provided free leagues for kids to play and learn baseball.

Magowan also revered the rich history of the franchise he started following as a child, signing Hall of Famer Willie Mays to a lifetime contract and bringing back Hall of Famers Willie McCovey and Orlando Cepeda to the organization to serve as special advisers. In 2008, he established the Giants Wall of Fame, which serves as a tribute to the organization's greatest players of the San Francisco era.

Magowan will be added to the Wall of Fame on Feb. 9.

"Peter Magowan has been a part of my life for a long, long time, first as a fan watching me play in New York and then, remaining a fan when we moved to San Francisco," Mays said. "Along the way, he became my friend. Peter would call me often to check in. He and Debby cared about me and it was so easy to care about them in return. It's hard to find the right words just now, but in losing Peter, I've lost a great, great friend. He was like my godfather. No one can replace him."

He is survived by wife Debby, five children and 12 grandchildren.

"Our family lost a great man today," the family said in a statement. "We all know how much Peter loved his Giants and San Francisco, and he had that same love and passion for his family. He was so proud of his children and grandchildren, and we will forever cherish the memories we made together."

Information from The Associated Press was used in this report.