Skip to content
CricketTaken

Hit by Pitch Rule: When the Batter Is Awarded First Base

The MLB hit by pitch rule: when a batter touched by a pitch gets first base, when it is only a ball or a strike, and how replay and scoring treat it.

By CricketTaken EditorialPublished MLB Rules25 min read

How this is written and checkedReport an error

Award
First base, ball dead
Career record
287, Hughie Jennings
Single-season record since 1900
50, Ron Hunt (1971)
Full batting helmets required in MLB
1971

A two-seam fastball runs in on a right-handed hitter, grazes the loose fabric of his jersey just above the belt, and smacks into the catcher's mitt. The hitter flinches, points at his shirt and starts walking. The plate umpire, after half a second, waves him toward first. Nobody touched the bat. No ball was put in play. The batter has reached base on the oldest free pass in the game other than the walk.

Under Rule 5.05(b)(2) of the Official Baseball Rules, the book Major League Baseball and the minor leagues play under, a batter is awarded first base when he is touched by a pitched ball he is not trying to hit. The ball is dead the instant it touches him. Runners move up only if they are forced: a runner on first goes to second, a runner on second alone stays put. There are exactly two exceptions written into the rule. A pitch that is in the strike zone when it touches the batter is a strike, and a batter who makes no attempt to get out of the way of a pitch outside the zone is charged with a ball. A batter who is swinging when the ball hits him gets a strike as well. Everything else on this page is detail on those few sentences.

The award: first base, a dead ball and only the forced runners move

The hit by pitch rule mlb umpires apply is short, and the consequence is fixed. The batter becomes a runner and is entitled to first base without liability to be put out. He does not have to sprint. He can jog, stop to take off his elbow guard, hand his batting gloves to the first-base coach and step on the bag at his own pace.

The ball is dead from the moment of contact. That has a set of consequences most fans absorb without noticing them. A runner who was stealing second on the pitch does not get the base because he was running. He gets it only if the batter's award forces him there. With a runner on second and nobody on first, the batter takes first and the runner stays on second, even if he was halfway to third when the pitch hit the batter. He has to go back.

The same logic applies all the way around the bases. Here is how the award plays out in the common base states:

Runners on base before the pitch Where everyone ends up after a hit by pitch Run scores?
None Batter on first No
First only Batter on first, runner to second No
Second only Batter on first, runner stays at second No
Third only Batter on first, runner stays at third No
First and third Batter on first, runner from first to second, runner stays at third No
Bases loaded Batter on first, every runner moves up one, run forced home Yes

The table is the whole of the advancement rule. Nobody goes two bases. Nobody advances on a pitch that skipped away after hitting the batter, because the ball was already dead when it skipped. A wild pitch that would have let a runner score from third simply does not exist if the pitch touched the batter first.

There is one more detail that matters in the box score. Because the ball is dead, the defense can make no play. A catcher who throws to second to catch a stealing runner is throwing a dead ball, and nothing he does counts.

This is the feature that distinguishes the hit batsman from the other ways a batter reaches first without hitting the ball. A walk leaves the ball live, so a runner stealing on ball four can keep going and take an extra base at his own risk. A dropped third strike leaves the ball live and lets the batter run. Our guide to the dropped third strike rule covers that one. On a hit by pitch, the game stops.

The batter has to touch first

The award is an entitlement, not a teleport. The batter must actually go to first base and touch it, and runners forced ahead of him must touch their next base too. In practice this almost never matters, but the rulebook treats every award of bases the same way, and a runner who fails to touch an awarded base can in principle be called out on appeal once the ball is put back in play.

The two conditions that cancel the award

The two exceptions are why "he got hit" and "he gets first base" are not the same thing.

The first is the strike zone. If the pitch is in the strike zone at the moment it touches the batter, it is a strike, whether or not he tried to get out of the way. The logic is plain enough. A batter cannot turn a strike into a free base by leaving his elbow or his knee hanging over the plate. The most common version is a breaking ball that dives into the zone and clips the front knee of a hitter who has stepped in toward the plate with his stride. Because the ball is in the zone when it touches him, he gets a strike. If it is strike three, he is out. Where the zone sits for each hitter is its own subject, covered in our explainer on the baseball strike zone, the rule and the real one.

The second condition is the one that causes arguments. A batter who makes no attempt to avoid being touched by a pitch outside the strike zone is charged with a ball, not awarded first. The ball is still dead. If that ball is ball four, he walks anyway, and forced runners move up as they would on any walk. If it is not ball four, he stays at the plate and the count moves.

How the plate umpire rules on a pitch that touches the batter
  1. Did the pitch touch the batter?If the ball met the bat first, or missed him entirely, this is not a hit by pitch at all.
  2. Was he swinging?A batter hit while offering at the pitch is charged with a strike, and the ball is dead.
  3. Was the ball in the strike zone?A pitch in the zone when it touches him is a strike, whatever he did to avoid it.
  4. Did he try to avoid it?A batter who made no attempt to get out of the way of a pitch outside the zone is charged with a ball.
  5. Award first baseOnly if every earlier answer favors the batter does he take first, with forced runners moving up.

The sequence under Rule 5.05(b)(2) and the definition of a strike in the Official Baseball Rules; each step is a judgment except the first, which replay can review.

How often umpires invoke the avoidance clause

Rarely. Most major league plate umpires give the batter the base unless he does something they cannot ignore: steps toward the pitch, drops a shoulder into a ball that would have missed him, or stands motionless as a slow curveball drifts into his thigh. The clause is in the rulebook to stop a hitter from manufacturing a base, not to require him to dive out of the way of everything.

That leniency is a judgment, and it is fair to criticize it. Batters crowd the plate wearing hard plastic on their front elbow and dare pitchers to come inside, and the rule that is supposed to discipline that behavior is used a handful of times in a season. An umpire who enforces it is likely to have a manager out of the dugout. An umpire who does not is unlikely to be second-guessed. The incentives point one way.

The college and high school rulebooks state the avoidance requirement too, and amateur umpires are told to apply it. A high school batter who turns his back and lets a slow pitch bounce off his backside is more likely to be sent back to the box than a big leaguer who does the same.

Hit while swinging: a strike, a dead ball and no run to first

Swinging changes everything. The rulebook definition of a strike includes a pitch that touches the batter as he strikes at it. So a hitter who starts his swing, gets fooled by a slider that bores in on his back foot and takes the ball on the toe has not been hit by a pitch for rule purposes. He has a strike.

The ball is dead on that strike, which is the detail that surprises people. A swing and a miss is ordinarily a live ball; runners can steal, and on strike three with first base open or two out, the batter can run if the catcher does not hold the ball. None of that applies here. Contact with the batter kills the play.

Strike three, then, is simply an out. Suppose a left-handed hitter with two strikes swings over a curveball that bounces in front of the plate, skips off his back ankle and caroms all the way to the backstop. He cannot run to first. The pitch touched him during the swing, the ball became dead, and the dropped third strike provision needs a live ball to operate. The umpire calls him out and the runners stay where they were.

The part that makes this fraught is the same judgment that makes the check swing rule so contested. A batter who starts a swing and tries to hold up just as the pitch hits him may or may not have "struck at" it. If the umpire rules he did not swing, he gets first base. If the umpire rules he did, he gets a strike, and on two strikes he is out. The half-swing appeal runs one way only: when the plate umpire rules no swing and awards first base, the defense can ask him to check with a base umpire, but a batter ruled to have swung has no appeal. The swing itself is a judgment, and managers cannot challenge it on replay.

When a swing and a hit by pitch happen in the same instant

Plays where the ball ricochets off the batter's hand while he is mid-swing look like foul balls from the stands and like nothing at all on television. The sound is different. A ball off the bat makes a crack; a ball off a hand makes a thud and is usually followed by the batter shaking his fingers. The plate umpire listens for that as much as he watches, and his ruling decides between a foul ball, which is a strike only if the batter has fewer than two, and a dead-ball strike, which counts on any count.

What counts as being touched by the pitch

The rule says touched, not hit, and the difference is generous. The pitch does not have to hurt. It does not have to strike skin. Under the rulebook and long-standing interpretation, a batter's clothing and protective equipment are part of the batter, so a pitch that brushes a loose jersey sleeve earns first base exactly as a fastball to the ribs does.

Here is how the common cases resolve when the batter is not swinging and the ball is outside the zone:

What the pitch touches Ruling
Body, including the hand or wrist Hit by pitch, batter to first
Loose fabric of the jersey or pants Hit by pitch, batter to first
Elbow guard, shin guard or helmet Hit by pitch, batter to first
Batting glove on the hand Hit by pitch, batter to first
Bat first, including the knob, then the batter Foul ball if the batter is in the box
Batter after bouncing in the dirt Hit by pitch, batter to first

The bounce question is among the most searched versions of the rule, and the answer is clean: a pitch that hits the ground before touching the batter still gives him first base, as long as he was not swinging and did not let it hit him on purpose. The rulebook defines a pitched ball by what the pitcher does, not by how it arrives. A curveball spiked two feet in front of the plate that kicks up off the dirt and into a batter's shin is a hit by pitch.

The jersey case looks like gamesmanship and is sometimes treated as such. Hitters who wear oversized jerseys collect a few hit-by-pitches a season on pitches that would have missed their bodies by an inch. The umpire has to see or hear the contact, and replay can confirm it, but the rule does not ask whether the jersey was baggy.

Are the hands part of the bat

No. This is a schoolyard rule that never existed in any official book. The hands are part of the batter. A pitch that strikes the batter's hand, fingers or wrist before touching the bat is a hit by pitch if he was not swinging, and a strike if he was. Only when the ball touches the bat first does the play become a foul ball or a ball in play.

The confusion probably comes from the sequence of events. A pitch that hits a hand that is wrapped around the bat almost always touches the bat as well, a millisecond later, and the result looks like a foul ball. Which surface the ball touched first is the whole ruling.

Bat first or body first: the hardest call to see live

Of all the variations of this rule, the bat-or-hand question is the hardest to get right in real time. The ball is often traveling more than 90 miles an hour, the hands and the bat handle are within an inch of each other, and the umpire is looking through the catcher's helmet at a crowded patch of air.

The order of contact decides the call:

  • Ball touches the hand first, batter not swinging. Hit by pitch. Batter to first.
  • Ball touches the bat first, then deflects onto the hand or body while the batter is in the box. Foul ball. Strike if fewer than two strikes.
  • Ball touches the knob of the bat only. Foul ball, or a fair ball if it goes into fair territory. The knob is part of the bat.
  • Ball touches the hand first, batter swinging. Strike. Dead ball.

Umpires lean on two cues. The first is sound, because wood against leather against bone produces three different noises. The second is the batter's reaction, which is less reliable than it sounds; a hitter whose knuckles take a fastball on a check swing will react just as dramatically whether the ball hit the bat first or not.

How replay settles it

This is where replay earns its keep. Whether a pitch touched the batter is one of the categories a manager can challenge under Major League Baseball's replay system, and the overhead and slow-motion angles in the replay center can usually show which surface the ball met first. A foul ball can be changed to a hit by pitch, and a hit by pitch to a foul ball.

What replay will not do is decide the surrounding judgments. If the replay official sees the ball hit the hand before the bat, but the plate umpire had ruled the batter was swinging, the result is a strike, not a free base. More on the boundary between the two below.

Leaning in and wearing armor: Scherzer and the elbow guard

Washington, June 20, 2015. Max Scherzer of the Nationals had retired the first 26 Pittsburgh Pirates he faced at Nationals Park. One out from a perfect game, with two strikes on Jose Tabata, Scherzer threw a slider that ran in on the hitter. Tabata, wearing a padded guard on his front elbow, appeared to lower the arm into the path of the ball rather than away from it. The ball hit the guard. The plate umpire awarded first base. The perfect game was gone.

Scherzer got the next batter and finished a no-hitter. The argument about the pitch has never quite ended. On video, Tabata's elbow drops and turns toward the pitch, and the rule says a batter who makes no attempt to avoid a pitch is not entitled to first base. Whether lowering a protected elbow is a failure to avoid the ball or merely a flinch is a judgment, and the umpire made it in the batter's favor in a spot where nearly every umpire would have done the same.

That play is the clearest illustration of why the avoidance clause is close to dead letter in the major leagues. An umpire who sends a batter back to the box for leaning in has to be certain, and leaning in is a matter of inches and intent.

The armor that changed the calculus

Elbow guards were once rare. Through the 1990s and 2000s they became standard for many hitters, often molded hard plastic over padding, and hitters began to stand closer to the plate with less fear of the inside fastball. Barry Bonds wore a large one; so did many of the hitters who led the league in hit-by-pitches through the 2000s and 2010s. The equipment allowed a hitter to take away the inside corner from a pitcher, and if he got hit, it hurt far less.

Major League Baseball has since set limits on the size of the guards, so that a hitter cannot wear what amounts to a shield. The direction of travel, though, has been toward more protection: shin and foot guards for the front leg, wrist guards, padded batting gloves. Each piece reduces the cost of getting hit. A batter who once had a reason to move out of the way now has a smaller one, and the avoidance clause asks umpires to police an incentive the equipment has changed.

When the umpire decides the pitch was deliberate

Rule 6.02(c)(9) of the Official Baseball Rules forbids a pitcher from intentionally pitching at the batter. When the plate umpire judges that a pitcher has done it, he has two choices, and the rule leaves the choice to him.

He can eject the pitcher on the spot, or the pitcher and his manager together. Or he can warn the pitcher and the managers of both teams that the next such pitch will bring the immediate ejection of whoever throws it and of that team's manager. Umpires usually take the second route the first time, especially after a single hit batter where intent is unclear. Warnings can also be issued before a game or at any point during it, which is common in a series that follows an earlier beanball incident.

Once warnings are out, the next pitch the umpire judges intentional brings the ejection of the pitcher and his manager. The manager is included because the rule assumes the pitcher was told to do it. A warning does not mean every subsequent hit batter is automatic; the umpire still has to judge intent. But in practice a pitch that hits a batter after warnings almost always produces two ejections unless it was obviously a breaking ball that got away.

What happens after a pitch the umpire judges intentional
  1. Umpire judges intentThe plate umpire decides the pitch was thrown at the batter on purpose, a judgment with no replay review.
  2. Choose a responseHe may eject the pitcher, or the pitcher and manager, or instead warn both benches.
  3. Warnings in forceAny later pitch he judges intentional ejects the pitcher who threw it and that team's manager.
  4. League reviewMajor League Baseball reviews the incident and may add fines or suspensions, which players can appeal.

The options in Rule 6.02(c)(9) of the Official Baseball Rules; league suspensions are imposed afterward by Major League Baseball, not by the umpires.

The suspensions that follow

Ejection ends the pitcher's day. The longer consequence comes from the league office, which reviews the video and can suspend and fine the pitcher and the manager. Suspensions for throwing at hitters usually run a handful of games for a pitcher. That is less than it sounds for a starter, whose suspension may cost him only one turn in the rotation. Players can appeal through the process the collective bargaining agreement sets out. Ejections more broadly, including who can be thrown out and what happens next, are covered in our guide to MLB ejection rules.

One honest note about intent. Umpires cannot read minds, and the rule asks them to. Context fills the gap: an earlier home run, a hit batter in the previous half-inning, a pitch behind the batter's head rather than at his hip. The rule is enforced on circumstantial evidence because there is no other kind.

How a hit batsman is scored

Hit by pitch is a scorer's dream because almost nothing is left to judgment. The batter is charged with a plate appearance but not an official at-bat, so his batting average does not move. It counts toward his on-base percentage as a time on base. It does not count as a walk; the box score lists it in its own column, HBP.

Statistic Effect of a hit by pitch
At-bat Not charged
Plate appearance Charged
Batting average Unchanged
On-base percentage Counts as time on base
Run batted in Credited if the bases were loaded and a run is forced home
Pitcher's line Recorded as a hit batter, no hit allowed

The on-base percentage formula is where hit-by-pitches earn their reputation. A hitter who is hit 20 times in a season has added 20 times on base to his total without changing his batting average, which is why plate-crowding hitters often carry an on-base percentage that looks out of line with their hitting.

The bases-loaded run and the game-ending version

With the bases loaded, the forced runner from third scores, and the batter is credited with a run batted in exactly as he would be on a bases-loaded walk. If it happens with the score tied in the bottom of the ninth or in extra innings, it ends the game, though not instantly: Rule 5.08(b) has the umpire wait until the runner from third has touched home and the batter has touched first. A celebrating runner who skips the plate can still cost his team the win. The walk-off hit by pitch is not a thing a hitter can plan, and it is rare, but when it happens the batter is credited with the RBI that won it.

A perfect game lost, a no-hitter intact

A hit batter ends a perfect game, because a perfect game requires that no opposing batter reach base by any means. It does not end a no-hitter, because a hit batter is not a hit. Scherzer's 2015 game against Pittsburgh is the standard example: no perfect game, a no-hitter all the same. The distinction between the two achievements is set out fully in our guide to the perfect game versus the no-hitter.

A pitcher who hits a batter is not charged with an error, and the batter does not get a hit. If the batter later scores, the run is earned unless an error or passed ball played a part in it.

What a manager can challenge and what stays a judgment call

Major League Baseball's replay system allows a manager to challenge whether a pitch touched the batter. That is a question of fact, and cameras answer it well. Within that single question the replay official can rule that the pitch hit the batter, that it hit only the bat, or that it hit nothing at all.

The rest is outside replay. These questions are reserved to the umpires on the field:

  • Whether the batter swung at the pitch.
  • Whether the pitch was in the strike zone when it touched him.
  • Whether he made an attempt to avoid it.
  • Whether the pitcher threw at him on purpose.

So a challenge can change "no hit by pitch" to "hit by pitch," but the replay official then has to apply the plate umpire's judgments as they stand. If the umpire had ruled the batter swung, a replay that shows the ball touching the batter's hand will produce a dead-ball strike, not first base. The details of how challenges are counted and how a crew chief requests a review are in our guide to MLB replay review rules.

The automated ball-strike challenge system that Major League Baseball introduced for the 2026 season does not change this. That system lets a batter, pitcher or catcher challenge a called ball or strike on a pitch the batter took. A pitch that hits the batter is not a called ball or strike in the ordinary sense, and the replay route stays the one used for hit-by-pitch disputes. The site's piece on the automated ball-strike system explains the challenge process for called pitches.

The record holders: Jennings, Biggio and Hunt

The career record for being hit by a pitch belongs to Hughie Jennings, the Baltimore Orioles shortstop of the 1890s, with 287. A large share of them came in a few seasons in the middle of that decade, when Jennings stood right on top of the plate and made getting hit part of his game. His 51 hit-by-pitches in 1896 remain the single-season record for any era.

Craig Biggio of the Houston Astros holds the modern mark with 285, accumulated over a 20-season career that ended in 2007. He wore a large elbow guard and made no secret of being willing to take a pitch. He finished two short of Jennings.

Ron Hunt holds the single-season mark since 1900, set with the Montreal Expos in 1971, when he was hit 50 times. Hunt stood close, wore baggy flannels and turned his body into inside pitches in a way the avoidance clause was presumably written for and almost never applied to.

Most career hit-by-pitches in major league history
Hughie Jennings287HBP
Craig Biggio285HBP
Tommy Tucker272HBP
Don Baylor267HBP
Jason Kendall254HBP
Ron Hunt243HBP

Career totals through the 2025 season; the list can move as active players add to their totals, though no player active in 2025 was close to these figures.

Show the numbers
Most career hit-by-pitches in major league history
ItemValue
Hughie Jennings287HBP
Craig Biggio285HBP
Tommy Tucker272HBP
Don Baylor267HBP
Jason Kendall254HBP
Ron Hunt243HBP

These totals stood as listed through the 2025 season. Career totals in this category move slowly, because even the most frequently hit modern players collect them at a rate of 20 to 30 a season at their peak, and few sustain it for long. Biggio's 285 is likely to stand as the modern mark for some time, but that is a judgment about the current crop of hitters, not a certainty.

Don Baylor, fourth on the list, was another plate-crowder who led the American League in hit-by-pitches repeatedly in the 1970s and 1980s. Jason Kendall did it as a catcher, which is remarkable given the wear the position already takes. Tommy Tucker was a 19th-century first baseman whose total, like Jennings's, came from an era when pitchers threw differently and batters stood differently.

Ray Chapman and the equipment that followed

Ray Chapman, the shortstop for the Cleveland Indians, was hit in the head by a pitch from Carl Mays of the New York Yankees at the Polo Grounds on August 16, 1920. He died early the next morning. He remains the only major league player killed by a pitch.

The pitch came as Chapman led off the fifth inning, in an era when the same ball stayed in play for innings at a time, scuffed and darkened. Mays threw underhand-style, from very low, and the ball was hard to see. After Chapman's death, umpires were instructed to replace dirty balls far more often, which is one of the factors historians cite in the offensive surge of the 1920s. The ban on the spitball and other doctored pitches had been passed before the season and took effect in 1920; it was not a response to Chapman's death, although the two are often told together.

Helmets did not follow quickly. They were tried and mocked for decades. Here is how the mandatory equipment arrived in the major leagues:

Year Change in Major League Baseball
1920 Ray Chapman killed by a pitch at the Polo Grounds
1956 National League requires batters to wear a helmet or a protective liner
1958 American League adopts its own helmet requirement
1971 Full batting helmets required, with existing players allowed to keep wearing liners
1983 Helmets with at least one earflap required for players entering the majors
Late 2010s Jaw guards attached to the earflap spread among hitters by choice

The grandfather provisions are why helmet history looks slower than the rule changes. Players already in the majors when a rule took effect were often allowed to keep their old habits, so the last players without full helmets and the last without earflaps appeared years after the rules passed.

The face guard after Stanton

The extension that hitters now wear over the jaw, usually called a C-flap, spread through the majors in the late 2010s, when stars including Mike Trout and Bryce Harper took it up. Giancarlo Stanton was hit in the face by a fastball in September 2014 and came back wearing a helmet with added face protection, the most visible early example of a hitter guarding his face after an injury. Many hitters followed, some after being hit, some as a precaution. Major League Baseball does not require it. A pitch to the face is still the worst outcome in the sport, and the equipment has made it less frequent and less catastrophic without removing it.

Why hitters are being hit more often

League-wide hit-by-pitch rates climbed through the 2010s and stayed high into the 2020s, reaching the highest levels in decades, and the clubs and the league have both noticed. Team totals above 100 hit batters in a season, almost unheard of for most of the twentieth century, turned up again in the early 2020s.

The pitching side of the ledger moved too. Austin Adams, a reliever for the San Diego Padres, hit more than 20 batters in 2021 while throwing fewer than 120 innings, a total that would have been high for a starter working twice as long. A slider that sweeps across the plate is a weapon when it lands where it is aimed and a hit batter when it does not.

The explanations on offer

There is no single cause, and anyone who claims one is simplifying. The explanations people inside the game put forward most often:

Velocity. Average fastball velocity rose steadily through this period. A hitter has less time to recognize a pitch that is going to hit him, and more of his time is spent committing to the swing. A batter who has already decided to swing cannot then decide to move.

Pitch design. Pitchers now design movement deliberately, using high-speed cameras and spin data, and some of that movement is aimed at the hitter's hands. Sinkers and two-seamers that run in on same-handed hitters, and sweeping breaking balls that start at the hip of an opposite-handed hitter, both put the ball where the body is. A pitch that misses its spot by a few inches ends up off a hip or a wrist.

Crowding the plate. Hitters stand closer and wear more armor, as the Scherzer section describes, and a pitcher working inside has less room.

Pitching inside on purpose. Teams found that elevated fastballs and inside pitches suppress damage, and asked pitchers to throw there. More pitches near the body produce more hit batters.

Some observers have also pointed to the pitch clock, introduced in 2023, as a factor, on the theory that pitchers with less time between pitches have less command. The data on that is not settled, and the rise in hit batters predates the clock, so the claim is better described as an argument than a finding. The broader effects of the clock are in the site's piece on MLB pitch clock rules, and the rest of the game's rules are collected at the baseball hub.

The fair conclusion is that the game's incentives changed, and the hit batter is one of the side effects. Hitters have less reason to give ground, pitchers have more reason to throw near the hands, and the ball is moving faster than at any time in the sport's history. The rule that governs the result has barely changed in a century. What surrounds it has changed almost completely.

How this page was put together

Written from the Official Baseball Rules and Major League Baseball's published replay and scoring provisions, with records stated as they stood through the 2025 season; it describes the professional rule and notes where college and high school codes differ without reproducing them.

Sources

  • Official Baseball Rules — Office of the Commissioner of Baseball
  • Major League Baseball Replay Review Regulations — Major League Baseball
  • NCAA Baseball Rules Book — National Collegiate Athletic Association
  • NFHS Baseball Rules Book — National Federation of State High School Associations

Questions

Hit by Pitch Rule, answered

Is it a hit by pitch if the ball bounces first?

Yes. A pitch that hits the dirt and then touches the batter still earns him first base, provided he was not swinging and the other conditions of the rule are met. The Official Baseball Rules care only that a pitched ball touched the batter, not about the path it took, so a breaking ball spiked in front of the plate that skips off a shin is a hit batsman.

Is it a hit by pitch if the batter swings?

No. A pitch that touches a batter while he is swinging is a strike, and the ball is dead at once. If it is the third strike he is out, and he cannot run to first even if the ball rolls to the backstop, because the dropped third strike rule needs a live ball. Whether he swung is the umpire's judgment and cannot be reviewed.

Are the hands part of the bat in baseball?

No. The hands are part of the batter. A pitch that strikes the batter's hand or fingers before it touches the bat is treated as hitting his body, so he is awarded first base if he was not swinging. Only when the ball meets the bat first, including the knob, is the play a foul ball or a ball in play.

Does a batter have to try to avoid being hit by a pitch?

Yes, under the rulebook. A batter who makes no attempt to avoid a pitch outside the strike zone is charged with a ball rather than awarded first base. In Major League Baseball the clause is invoked rarely, usually when a hitter visibly leans or steps into the ball. College and high school umpires apply their own versions of the same requirement.

Does a hit by pitch count as an at-bat?

No. A batter awarded first base after being hit by a pitch is charged with a plate appearance but not an official at-bat, so his batting average does not change. The hit by pitch does count in on-base percentage, and with the bases loaded it forces in a run that is credited to the batter as a run batted in.