The Cardinals’ A.J. Pierzynski, left, shown on Tuesday, had a near-miss Wednesday night when he lost his grip on his bat. (Keith Srakocic/Associated Press)

In the ninth inning of Wednesday night’s Cardinals-Pirates game, St. Louis catcher A.J. Pierzynski fouled off a pitch and the bat flew out of his hands. It went up over the Cardinals’ dugout, almost directly over the head of Manager Mike Matheny, who was stationed on the steps, and into the first row of seats toward where two fans sat. Only one of whom appeared to realize that they were about to get clobbered, and potentially seriously hurt.

Fortunately, the fan who was blithely unaware of what was going on was wearing a Cardinals hat, and the brim of it averted a dangerous incident. Just watch:

Amazing! The bat is hurtling at the pair, spinning sideways and aimed at both of their heads, but at the last possible moment, the handle of the bat (i.e., the thin end) hits the brim of the man’s cap, grazing the woman’s arms but otherwise falling harmlessly in front of them.

The man wound up with a nice souvenir and, one presumes, a belated realization of how lucky he really was.