Willie McCovey, shown in 2010, remained a familiar figure at Giants games through the 2018 season. (Eric Risberg/Associated Press)

Willie McCovey, one of the greatest players in San Francisco Giants and National League history, has died at age 80. The Giants announced the news Wednesday, saying that the Hall of Fame slugger “passed away peacefully this afternoon” after “losing his battle with ongoing health issues.”

McCovey enjoyed a 22-year MLB career, 19 of which were spent in San Francisco, in which he won rookie of the year, NL MVP and comeback player of the year awards and was a six-time all-star. He led the NL in home runs three times and in RBI twice and still holds the league mark for most career grand slams with 18. His 521 home runs rank 20th all-time.

McCovey made an immediate impression in his first major league season in 1959, when he hit 13 home runs in just 52 games, and he and Willie Mays went on to form one of the most imposing 1-2 punches in baseball history over the 13 years they played together. McCovey ended his career in 1980 with 1,555 RBI and a record for most home runs by a left-handed NL hitter, a mark that would stand until another Giants slugger, Barry Bonds, broke it in 2001.

One of the few baseball accomplishments that eluded McCovey was a championship, although he came close to helping the Giants attain one, agonizingly so. He made the final out in Game 7 of the 1962 World Series, hitting a sharp line drive that Yankees second baseman Bobby Richardson famously snared to break countless hearts in San Francisco.

“Baseball has lost a giant, in every sense of the word, with Willie McCovey’s passing this afternoon,” Hall of Fame President Jeff Idelson said in a statement. “There wasn’t a batter more feared by opposing pitchers than Willie Mac. . . . The Hall of Fame mourns the passing of a legend who had a heart of gold.”

An Alabama native nicknamed “Stretch” for his 6-4 frame, McCovey mostly played first base during a career that included stops in San Diego and Oakland. His immense popularity among San Francisco fans continued until his final days, as he remained a familiar figure at the Giants' ballpark, where he frequently attended games and annually handed out to players a team award named in his honor.

When the Giants moved into a new facility in 2000, the part of the San Francisco Bay just beyond the right field wall and seating area was quickly dubbed McCovey Cove, on the notion that if he were still playing, he would have swatted scores of ill-fated pitches into the water there. In 2003, in a spot near the stadium that overlooks McCovey Cove, the team placed a statue that immortalized his follow-through on a home run swing.

As recently as the final game of the 2018 season, McCovey was at AT&T Park. He needed to be taken to the hospital that day but reportedly was back home soon after.

Over the past few years, McCovey required the use of a wheelchair, having long suffered from arthritic knees and had undergone numerous surgeries. One such procedure four years ago resulted in an infection that nearly took his life, and the San Francisco Chronicle reported Wednesday that McCovey had recently developed another infection and been hospitalized last week.

“San Francisco and the entire baseball community lost a true gentleman and legend, and our collective hearts are broken,” Giants President and CEO Larry Baer said in a statement. “Willie was a beloved figure throughout his playing days and in retirement. He will be deeply missed by the many people he touched. For more than six decades, he gave his heart and soul to the Giants — as one of the greatest players of all time, as a quiet leader in the clubhouse, as a mentor to the Giants who followed in his footsteps, as an inspiration to our Junior Giants, and as a fan cheering on the team from his booth.”

“Willie’s greatest passion was his family and our thoughts and prayers are with his beloved wife, Estella, and his daughter, Allison, and her children Raven, Philip, and Marissa,” Baer added.

Read more from The Post:

Boston Red Sox World Series parade: Beer, duck boats and a David Price decision

Nationals offseason priorities: What are the top items on Mike Rizzo’s checklist?

DJ Durkin, Maryland part ways following outcry over coach’s reinstatement