Tony Gwynn, who banged out 3,141 hits during a Hall of Fame career spanning 20 seasons with the San Diego Padres, has died of cancer at age 54, it was announced Monday.

The lefty-swinging Gwynn, nicknamed Mr. Padre, had a career .338 batting average, won eight National League batting titles and played in the franchise's only two World Series.

He died early Monday morning at Pomerado Hospital in Poway, California, while surrounded by his family, the Baseball Hall of Fame announced.

"Major League Baseball today mourns the tragic loss of Tony Gwynn," commissioner Bud Selig said in a statement Monday. "The greatest Padre ever and one of the most accomplished hitters that our game has ever known, whose all-around excellence on the field was surpassed by his exuberant personality and genial disposition in life.

"... For more than 30 years, Tony Gwynn was a source of universal goodwill in the National Pastime, and he will be deeply missed by the many people he touched."

Gwynn had been signed to a one-year contract extension as the baseball coach at San Diego State on Wednesday. He had been on medical leave since late March while recovering from cancer treatment. He took over the program at his alma mater after the 2002 season.

Survivors include his wife, Alicia, daughter, Anisha, and son, Tony Jr., who plays with the Philadelphia Phillies. Gwynn Jr., who is hitting .155 in 52 games this season, was put on the bereavement list Monday.

Today I lost my Dad, my best friend and my mentor. I'm gonna miss u so much pops. I'm gonna do everything in my power to continue to... - Tony Gwynn Jr. (@tonygwynnjr) June 16, 2014

Make u proud! - Tony Gwynn Jr. (@tonygwynnjr) June 16, 2014

He had two operations for cancer in his right cheek between August 2010 and February 2012. The second surgery was complicated, with surgeons removing a facial nerve because it was intertwined with a tumor inside his right cheek. They grafted a nerve from Gwynn's neck to help him eventually regain facial movement.

Gwynn had said that he believed the cancer was from chewing tobacco.