Odúbel Herrera didn’t get to wear the home-run hat.

But after Herrera drove in two runs by bunting -- yes, bunting -- for a double Saturday night, Bryce Harper flung his arm around him as they walked to the outfield together before the fifth inning. In the midst of a four-game losing streak, with the manager seething and the fans’ patience waning, it was what they needed.

“It was big,” pitcher Zack Wheeler said after the Phillies’ had-to-have-it 6-1 victory over the Colorado Rockies. “I don’t think anybody really expected it except for maybe Odúbel. That was a big momentum-booster right there. It’s the kind of stuff we need.”

OK, so maybe it wasn’t exactly what Joe Girardi meant Friday night and again Saturday when he called for the Phillies to “keep the line moving” with a more multidimensional offense.

But with the bases loaded and two out in the fourth inning and Colorado Rockies third baseman Ryan McMahon shifted over to shortstop, Herrera recognized an opportunity. He pushed a perfect bunt down the third-base line. McMahon tried to cut it off, but it rolled under his glove, enabling two runs to score and Herrera to chug into second base.

“I was ready to hit, but as soon as I saw the third baseman too much over to shortstop, I said this is a good moment to bunt because he was way far,” Herrera said. “It was good. Thank god, the bunt was good.”

The Phillies won for the first time since Monday in Milwaukee and even gained ground on the first-place Atlanta Braves, who lost at home to the Miami Marlins. The Phillies trail Atlanta by 3 1/2 games in the National League East with 20 games remaining.

Jean Segura, Brad Miller, and Bryce Harper homered to stretch the lead in the late innings and had the Phillies’ customary straw home-run hat placed on their heads when they got back to the dugout. But Herrera’s bunt -- exit velocity: 36.4 mph -- was the sort of thing Girardi stressed before the game when he said the Phillies must be willing to work walks, slap singles to the opposite field, and generate offense that “doesn’t have to be a home-run swing every time.”

“It’s probably not what I envisioned, but it’s taking advantage of a situation,” Girardi said. “It’s important in our game that you can execute in different ways. It was outstanding by Odúbel, and that was a big play in the game, for sure.”

Girardi said Herrera wasn’t expressly told in the moment to bunt. But the Phillies have encouraged him to take advantage of those situations. And Herrera said the Phillies were aware of Girardi’s frustration with an offense that had scored eight runs in the last four games and less than four runs in six of the last eight games.

“He said a lot of good things yesterday, and that was one,” Herrera said. “I think we played good today, and we did what he said.”

Early on, though, it was more of the same. Rockies starter Kyle Freeland got through three innings in only 28 pitches. Although the Phillies hit a few balls hard, they had one hit and didn’t move a runner beyond first base.

But Segura led off the fourth inning with a single, Harper drew a four-pitch walk, and McCutchen walked to load the bases. Didi Gregorius worked a one-out, bases-loaded walk to force in a run. Yet after Ronald Torreyes fouled out, it seemed the Phillies may have to settle for a 1-0 lead.

That’s when Herrera – dropped to eighth in the batting order against lefty Freeland – invoked the element of surprise.

“It’s a perfectly placed bunt,” Wheeler said. “He read it well and he got it down and the guys on the bases were ready to roll.”

Just like Girardi wanted.

Go figure.

Wheeler whiffs 1,000

Wheeler gave up one run on Trevor Story’s homer in 6 ⅔ innings to pick up his 13th win of the season and second this week. He spun six shutout innings five days earlier in Milwaukee.

But he also reached a career milestone: his 1,000th strikeout on a 97-mph sinker to Rockies cleanup hitter C.J. Cron. Wheeler is the 31st active pitcher with 1,000 strikeouts and the third Phillie to hit the mark this season. Aaron Nola and Kyle Gibson picked up their 1,000th on June 1 and Aug. 1, respectively.

“It’s pretty cool,” Wheeler said. “It’s a lot of strikeouts, pitching a good bit of time in the big leagues. There are so many things that really go into it, all the ups and downs. It’s a pretty cool accomplishment to conquer.”

Wheeler finished with eight strikeouts, hiking his league-leading total to 225. With four starts left (likely Sept. 17 at the New York Mets, Sept. 22 vs. the Baltimore Orioles, Sept. 28 at the Braves, and Oct. 3 at the Miami Marlins), he has the third-most strikeouts of any Phillies pitcher since 2000, trailing Cliff Lee (238 in 2011) and Nola (229 in 2019).

Jean’s in style

Looking for a hot Phillies hitter other than Harper?

Try Segura.

Segura went 2-for-4 and has at least one hit in 13 of his last 16 games. He’s 23-for-66 (.348) during that stretch and has enabled Harper to get more opportunities to hit with a runner on base.

It has been more challenging for the Phillies to find production behind Harper. But McCutchen came through against a lefty, as usual. He reached base three times against Freeland, with a second-inning single, a fourth-inning walk, and a double in the fifth.

Out at home

The Phillies cut down two runs at the plate. In the second inning, with one out and McMahon running on contact from third, Gregorius made a strong throw to erase a potential run. Then, in the eighth, Harper dug out a ball in the right-field corner and Realmuto made a sharp tag after catching an off-line relay throw from Segura.