Tony Gwynn, appreciated throughout baseball for his wizardry with a bat and beloved in San Diego for his loyalty to his adopted city, died Monday. He was 54.

Gwynn died in a Poway hospital after a four-year battle with cancer, the National Baseball Hall of Fame announced.

Gwynn's infectious smile and cackling laugh put a cheerful face on the perpetually struggling San Diego Padres. He was a star in 1984 and in 1998, the only World Series appearances in the Padres' 46-year history, and he was tagged as "Mr. Padre" long ago.

"The only thing more dependable in San Diego than sunshine was Tony Gwynn," Padres Executive Chairman Ron Fowler said.

Gwynn was inducted into the Hall of Fame in 2007, winning election with 97.6% of the vote, a total exceeded by only six players —Tom Seaver, Nolan Ryan, Cal Ripken, Ty Cobb, George Brett and Henry Aaron. Gwynn did not hit home runs deep into the night, or strike out helpless batters with a blazing fastball. But in an era better known for steroid-fueled sluggers, Gwynn was a singles-hitting magician.

His .338 all-time batting average is the highest of any player to start his career after World War II.

On the final weekend of his career, in 2001, the Padres stenciled two numbers on the field. In right field, where he played, they stenciled 19, his uniform number. In between the third baseman and shortstop, they stenciled "5.5," a reference to his uncanny ability to hit the ball between those two fielders.

He won eight batting championships, tied with Honus Wagner for the National League record. He hit .289 as a rookie, then .300 or better for the remaining 19 seasons of his career — including .394 in 1994, when a strike ended the season in August.

In 1995, he had 535 at-bats and struck out 15 times. In contrast — and as an example of how the strikeout has lost its stigma — Adam Dunn of the Chicago White Sox has struck out 15 times in his past 29 at-bats.

In 107 career at-bats against Hall of Famer Greg Maddux, Gwynn hit .415 — and never struck out.

"Tony Gwynn was the best pure hitter I ever faced," Maddux said via Twitter on Monday.

In the Padres' tiny clubhouse at Jack Murphy Stadium, Gwynn held court in a cramped corner. His collection of video equipment was nearby, years before teams invested in recording devices and video players so major leaguers could see what they were doing wrong and what strategies were being used against them.

"I would not be standing here today without video," Gwynn said in his Hall of Fame induction speech.

Gwynn loved to talk baseball, so much so that his locker became a gathering place for reporters after games, whether he had played well in that game or had not played at all. In 1984, when he made the first of his 15 All-Star Game appearances, he had the locker next to Ozzie Smith, whose ever-present smile convinced Gwynn that he need not choose between having a good time and playing a serious game.

"When you laugh and you can laugh at yourself and laugh at others," Gwynn said in his speech, "that makes the game a whole lot easier to play."

Anthony Keith "Tony" Gwynn Sr. was born May 9, 1960, in Los Angeles. He grew up in Long Beach, the middle son among three. His younger brother, Chris, played parts of seven seasons with the Dodgers and played his final season in 1996 as a teammate of Tony on the Padres.

The three boys played baseball all the time, Gwynn said, just because they loved the game.

"I don't think any of us thought that hitting a fig or hitting a sock ball or hitting a wad of tape was going to turn into this," Gwynn said in his Hall of Fame speech. "Just unbelievable."

Gwynn starred at San Diego State — in baseball, yes, but also in basketball, where he still holds the record for assists. On June 10, 1981, Gwynn was taken in the third round of the baseball draft by the Padres and the 10th round of the NBA draft by the San Diego Clippers.

In 1982, Gwynn got his first major league hit, against the Philadelphia Phillies. He got a handshake from the Phillies' first baseman, the player who remains baseball's all-time hit leader.