Max Scherzer is batting .292, just a tick behind MLB-leading pitcher Patrick Corbin (.294) of the Diamondbacks. (Jennifer Stewart/Getty Images)

Earlier this month, Max Scherzer walked past an eight-piece mariachi band performing on the field at Nationals Park for Cinco de Mayo and couldn’t help himself. He wasn’t scheduled to take batting practice on the field that day; none of the Washington Nationals’ starting pitchers were. That didn’t matter. The opportunity was too enticing.

“I’ve gotta hit BP,” Scherzer said. “When else do you get to hit to a mariachi band?”

So Scherzer grabbed his batting gloves and bat, jumped in with a group of position players and took his hacks. A year ago, Scherzer, arguably the best pitcher on the planet, wasn’t taking batting practice. He was advised to not take the extra swings to protect his right ring finger, which had developed a stress fracture the previous season. Pitching was his sole focus for most of the year. It wasn’t until August that Scherzer finally took batting practice for the first time.

The impact was evident, if overlooked; Scherzer batted .161 in 72 plate appearances, the lowest batting average he’s ever posted over a full season in the National League. He slugged his first career home run Aug. 1 at Miami but insisted it was lucky and only happened because he couldn’t move his neck, which forced him to exit the game in the bottom half of the inning. Of course, Scherzer’s hitting wasn’t a topic of conversation as he earned his second consecutive National League Cy Young Award.

This year, Scherzer’s hitting has not gone unnoticed. Every fifth day, he’s seen with his gray batting gloves on, bat in hand, an intense look in his eyes as he shuttles between the clubhouse and batting cage a couple of hours before first pitch. Hitting is part of his unrivaled preparation again and, not coincidentally, Scherzer has at least one hit in six of his nine starts this season. In his last outing, against the Arizona Diamondbacks last Friday, he went 2 for 3 with an RBI ground-rule double to raise his batting average to .292.

Only Arizona’s Patrick Corbin, who is batting .294, has a higher batting average among pitchers with at least 20 plate appearances this season (excluding Los Angeles Angels two-way standout Shohei Ohtani). Since 2016, Scherzer leads all pitchers with 30 hits and is second with 20 RBI.

“We’re a really strong lineup one through eight — one through nine when Max is in there,” Bryce Harper noted.

Nationals hitting coach Kevin Long said Scherzer hits every day and constantly asks questions, diligently searching for a nugget of information that could make the difference. Manager Dave Martinez said Scherzer game-plans for hitting like he game-plans for pitching. He watches the pitcher, attempting to figure out how the pitcher will attack him. Long recalled Scherzer telling him he wanted to see a few pitches before a recent at-bat because the pitcher’s pitch count was low. Long was taken aback.

“He wills himself,” Long said. “You know what the other thing is? He works extremely hard at it. He hits every day. He’s pulling one of us — Joe [Dillon], Bob Henley or myself. He works at it. He’s diligent in his work. He’s always asking questions. He wants to know the answers to why this happens or how he can do this better … Stuff you just wouldn’t expect your pitcher to pay attention to, he does.”

Scherzer recently said he feels more comfortable at the plate simply because of repetition. He’s better against breaking pitches, for example, because he’s seen more of them. But he also understands his limitations.

“I’m probably not going to get a hit,” Scherzer said. “I know that. I just want to make the pitcher work.”

But Scherzer’s competitiveness knows no bounds. He vowed he could somehow improve as a pitcher this season after consecutive Cy Young Awards and so far he has, compiling a 1.69 ERA and an NL-best 91 strikeouts through nine starts. He had wanted to steal a base for years and, with Martinez’s green light, he finally swiped one last month. And last month — on a day he struck out 10 in six innings in a blowout win over the San Francisco Giants — Scherzer was mad at himself for not extending his four-game hitting streak.

A week later, he ripped an RBI single and scored two runs while striking out eight in another win.

“Most pitchers don’t think like Max,” Martinez said.

More on the Nationals:

As Matt Wieters has surgery on left hamstring, Nationals likely to hunt for catcher

Mailbag: Why do the Nats always lie about injuries? (Well, maybe not always.)

Thomas Boswell: The Nationals’ bullpen prayed for rain, and now it has a chance for much-needed reset

When it comes to Bryce Harper, doing enough means always doing more

Bryce Harper won’t play any games with N.Y. media