Willie McCovey, the Hall of Fame first baseman who played 19 of his 22 seasons with the San Francisco Giants and slugged 521 career home runs, died Wednesday at age 80.

The Giants said McCovey died "peacefully" after battling "ongoing health issues."

"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."

The Giants paid tribute to McCovey on Wednesday afternoon by flying the flags at AT&T Park at half-staff.

Nicknamed "Stretch" because of his 6-foot-4 frame, McCovey teamed with Willie Mays to create a formidable 1-2 punch in the Giants' lineup for the 13 seasons the two played together.

McCovey retired in 1980 with the most home runs ever by a left-handed hitter in the National League, a mark that stood until 2001 when Barry Bonds, another Giant, broke it. He finished his career with 18 grand slams (second only to Lou Gehrig at the time), and led the league in home runs three times and RBIs twice. He was a six-time All-Star who finished his career with a .270 batting average, 521 home runs and 1,555 RBIs.

McCovey made his major league debut in 1959, going 4-for-4 in his first game. He hit .354, with 13 home runs and 38 RBIs in 52 games that season and was named Rookie of the Year.

One of McCovey's best seasons came in 1969, when he won MVP honors. That year, he led the league in home runs (45), RBIs (126) and on-base percentage (.453).

Bonds remembered McCovey in a series of emotional tweets late Wednesday night, writing in part, "I am crying over losing you even when you told me not to. ... Uncle Mac thank you for your mentorship and unconditional love for me and my family. You will be dearly missed."

Rest in peace, Uncle Willie McCovey. I love you. pic.twitter.com/7cWguIR6SD — Barry L Bonds (@BarryBonds) November 1, 2018

Fellow Hall of Famer Orlando Cepeda, who played with McCovey in San Francisco from 1959-66, also saluted his former teammate in a tweet.

McCovey was traded by the Giants to the San Diego Padres in 1973. He played in San Diego and Oakland before returning to San Francisco as a free agent for his final four seasons. He won the Sporting News NL Comeback Player of the Year award his first season back with the Giants in 1977.

McCovey is one of seven players in history to win a rookie of the year award, a league MVP and an All-Star Game MVP award. The others are Cal Ripken Jr., Mays, Mike Trout, Frank Robinson, Fred Lynn and Ichiro Suzuki.

"Willie McCovey was one of our game's greatest power hitters," MLB commissioner Rob Manfred said in a statement. "He won the National League MVP in 1969 and, alongside fellow Hall of Famer and Alabama native Willie Mays, was a key part of many memorable Giants' teams. For 22 years on the field and many more after retiring, Willie was a superb ambassador for the Giants and our game."

One honor that eluded McCovey was a World Series ring. He came close in 1962, coming up short in a nail-biting seven-game series against the New York Yankees. McCovey went to the plate with two outs in the bottom of the ninth inning, his team down 1-0, with runners on second and third base. McCovey sliced a drive toward right field that looked like it could drive in the winning run but instead was caught by Yankees second baseman Bobby Richardson to end the game and the series. The moment was so iconic that it was featured in a Peanuts comic strip.

"I still think about it all the time," he said in 2014. "I still think, 'If I could have hit it a little more.'"

McCovey's legacy in San Francisco has endured past his career. Home runs hit over the right field wall at AT&T Park splash into the water of McCovey Cove, and the "Willie Mac" Award, voted on by players, coaches and training staff, is awarded by the Giants every year to recognize the team's most inspirational player.

McCovey had spent the past 18 years in a senior advisory role for the Giants. He had been getting around in a wheelchair in recent years because he could no longer rely on his once-dependable legs, yet was still regularly seen at the ballpark in his private suite. He had attended games at AT&T Park as recently as the final game of the 2018 season.

"Every moment he will be terribly missed," said McCovey's wife, Estella, whom he married this past summer. "He was my best friend and husband. Living life without him will never be the same."

McCovey had a daughter, Allison, and three grandchildren, Raven, Philip, and Marissa. McCovey also is survived by sister Frances and brothers Clauzell and Cleon.

The Giants said a public celebration of McCovey's life would be held at a later date.

The Associated Press contributed to this report.