Tony Gwynn, a stocky dynamo of the San Diego Padres who ranked among the most successful hitters of all time, with 3,000-plus career hits and the highest single-season batting average since Ted Williams in 1941, died Monday in Poway, Calif., a San Diego suburb. He was 54.

The cause was salivary gland cancer that Mr. Gwynn attributed to decades of chewing tobacco, according to Major League Baseball.

He had been on medical leave since March from San Diego State University. He had been head baseball coach at the university since his retirement in 2001 after 20 seasons with the Padres. At San Diego State, he helped guide the collegiate career of Stephen Strasburg, now an ace pitcher for the Washington Nationals.

Gwynn, a 15-time all star who was voted into the National Baseball Hall of Fame in his first year of eligibility (2007), was regarded foremost as a stellar contact hitter. Starting in 1983, he went on to a remarkable streak of 19 consecutive years with a batting average exceeding .300 — a major league feat second only to the Detroit Tigers’ Ty Cobb, who had retired in 1928.

A left-handed hitter, Gwynn had a .338 lifetime batting average and reached the elite mark of 200 hits in a season five times. He never struck out more than 40 times in a season. In 1984, when he led the National League in hitting, he struck out a mere 23 times in 675 plate appearances.

He also racked up 3,141 career base hits and won eight National League batting titles — tying a record set by Honus Wagner of the Pittsburgh Pirates almost a century a earlier and bested only by Cobb (who had 12). Gwynn also received five Gold Glove Awards for his defensive excellence as an outfielder.

Known as “Mr. Padre,” Gwynn was the public face of the San Diego franchise and, like his contemporary Cal Ripken Jr. of the Baltimore Orioles, one of the rare superstars of baseball’s modern free-agency era to play his entire career with one team.

He demonstrated fierce loyalty to his mediocre team, reportedly declining lucrative offers to play elsewhere.

The Padres won three National League West division titles in Gwynn’s career — in 1984, 1996 and 1998 — and twice advanced to the World Series.

In the ’84 World Series, San Diego was overpowered by the Detroit Tigers, losing 4 games to 1, and was swept in four games by the New York Yankees in 1998. In a total of six postseason series in his career, Gwynn’s batting average was a solid .306.

Before injuries began to slow him, Mr Gwynn was also fleet afoot, stealing 30-plus bases four times in his first eight seasons, including 56 in 1987 and 33 in 1984, the year he won his first batting title.

Gwynn’s legacy at bat was a remarkable display of control and consistency. He developed a favorite swing that allowed him to poke singles through what is called the “5.5 hole” between third base and shortstop, referring to the baseball convention of numbering the third base position as 5 and the shortstop position as 6.

Gwynn, who stood 5-foot-11 and whose weight frequently was north of 200 pounds, was not the most lithe of athletes. He endured a series of knee surgeries and occasional slumps. Obsessed with hitting, he began to analyze and improve his technique with the help of a new technology — videotape — after first using the device on his infant son in the early 1980s.

In 1994, Gwynn nearly became the first player in more than half a century to reach the elusive .400 mark since Williams hit .406 in 1941 with the Boston Red Sox of the American League.

Gwynn was hitting .394 in early August of 1994 when a players strike scuttled the rest of the season and canceled the World Series. His average that year was the highest single-season mark in the National League since 1930, when Bill Terry hit .401 for the New York Giants.

“My mom and dad always used to tell me the best approach is just be humble,” Gwynn told the Sporting News. “Be humble, go on about your business, do what you got to do and, when it’s all said and done you can look back and say, ‘Hey, I gave it a great run,’ or ‘Hey, I didn’t,’ or ‘Hey, I fell short,’ but as long as you prepare yourself every day to go out there and give it your absolute best effort to get it done, you can look at yourself in the mirror when it’s over.”

Anthony Keith Gwynn was born May 9, 1960, in Los Angeles to a warehouse worker and a postal employee. He grew up in Long Beach, Calif., where Tony Gwynn played ball in the family’s back yard with an older and younger brother.

He won a basketball scholarship to San Diego State, where he was a star point guard and set team records for assists that stood for years. (His younger brother, Chris, also attended San Diego State and was an outfielder with major league teams including the Padres.)

Tony Gwynn was later drafted by the San Diego Clippers of the National Basketball Association, but he said his relatively modest height was the chief reason he reconsidered his basketball prospects and in his sophomore year tried out for his college baseball team, the Aztecs. He said the head coach gave him a chance only because he came recommended by a teammate, shortstop Bobby Meacham, who later played in the major leagues.

He proved to be one of the school’s most distinguished ballplayers, hitting .416 his senior year. He was chosen by the Padres in the third round of the 1981 draft.

Gwynn spent a little more than a year in the minor leagues before his big league debut with the Padres in July 1982. In his first at bat, he drove in a run with a sacrifice fly, then later had a double and a single — a pretty good game even for a seasoned player.

During the game, the Cincinnati Reds first baseman Pete Rose, who became baseball’s all-time hit leader, reportedly quipped to Gwynn, “What are you trying to do, catch me after one night?”

Gwynn stuck with the Padres through season after pedestrian season, and his sensational play was one of the team’s few highlights.

After the 1998 World Series loss, Gwynn faced a mounting number of injuries, but he set as a mission what only 26 players had previously achieved: 3,000 hits. Gwynn reached that milestone on Aug. 6, 1999, against the Expos in the old Olympic Stadium in Montreal, lashing a single to centerfield in the first inning off pitcher Dan Smith. He finished the day with four hits.

Survivors include his wife, the former Alicia Cureton; two children, Tony Gwynn Jr., an outfielder with the Philadelphia Phillies, and Anisha Nicole Gwynn, a hip-hop and rhythm-and-blues singer; and his brothers.

The Padres retired Gwynn’s number, 19, after his playing days ended in 2001. After the required five-year waiting period, he was elected to the Baseball Hall of Fame the first year he was eligible, along with Ripken.

“The word I think of is ‘validation,’ ” Gwynn told the Gaslamp Ball blog. “I wasn’t a home run hitter, an RBI guy, a game changing player. But the beauty of the game of baseball is that there is a place for every type of player and I played a certain style for 20 years. It wasn’t a style that will get you many fans, but there is a place in the game for it.”