Anaheim, Calif. — As Manny Machado’s batting average steadily climbed over the past month, it seemed to be just a matter of time before the power numbers followed.

His season-long slump hid the fact that he was hitting the ball hard consistently, but Machado had few results to show for it. All along, he tried to be patient, saying he knew the steady hard contact would eventually lead to hits.

And now, as the Orioles reach a pivotal stretch in their schedule, embarking on a 10-day, 10-game West Coast trip, Machado is settling into a groove.

This season has tested Machado. A 91.8-mph exit velocity that tied for eighth highest in baseball indicated that he was making consistent solid contact, but his batting average sat at .215 in early July and was below .240 for most of the season.

Machado has shown his frustration on occasion, especially when failing to produce with runners in scoring position, tomahawking his bat into the ground on his way to first base as the Orioles stumbled into the All-Star break and nearly fell off the edge of the playoff race.

“I can’t tell you how hard it is to get where he’s got from where he was,” manager Buck Showalter. “It takes a lot of strong constitution to do it. You go through a period of [asking yourself], ‘When’s the game going to let me up?’ If you stay true to it and you get grinding and keep working, it will let you up. Manny’s in that mood where he wants some people to pay for his struggles.”

Machado is a player who can put a team on his back offensively, and he’s done it in the past. And in the Orioles’ 6-2 win over the Los Angeles Angels on Monday night — an uplifting victory to open the trip — he refused to allow the team to waste a strong start from right-hander Dylan Bundy, something the Orioles offense has done too often this season, by breaking open a tie game with his fifth career grand slam.

Staying back but still in attack mode, Machado waited for Angels starter JC Ramirez, who fed Machado a heavy dose of sliders his previous at-bats, to throw a slider that crept over the heart of the plate. Machado got what he wanted when he turned on an 1-0 pitch, making contact in front of the plate and hitting it an estimated 432 feet to left field over the two-tier bullpens.

Machado relished being in that spot.

“Everyone does,” Machado said. “Obviously everyone does love to be in that situation. Unfortunately sometimes in that situation we fail more than we succeed but we always want that opportunity to try to put our team in the lead.”

The blast was Machado’s third homer in his past four games. He’s driven in 12 runs in his past five games, which equals his total for May, a forgettable four weeks during which he hit just .191.

Over the past month — dating to July 7 — Machado is hitting .376/.418/.596, raising his season slash line to .256/.318/.464. But before his recent power display, Machado began steadily lifting his average without the power, going 22 straight games without a homer. Still, he was seeing results — his average has risen 41 points over the past month — and kept the faith that his power would come.

Machado’s power stroke is return, just as it did this time last season. August was Machado’s most productive month offensively in 2016, as he had 10 homers and 25 RBIs with a .936 OPS.

“Just staying consistent will always give you a good outcome,” Machado said. “Staying consistent with our routine every day. Things starting [to turn] out how I want, hits start falling. I’m getting a little couple cheap hits instead of hard lineouts I’ve gotten in the past. Just trying to continue my routine and hopefully things turn around.”

Another byproduct has been better hitting in the clutch, as was the case Monday. Over the past month, Machado is also hitting .385 with runners in scoring position — going 10-for-26 — after batting just .264 (14-for-53) for the season before that.

“He’s not letting things snowball,” Showalter said. “He might have a couple of at-bats with nothing to show for it, but he’s still dangerous the next time up. You just see him between innings. There’s a lot more confidence. The support system is a good one for all our guys because we’re all going to go through those periods. Can you imagine being that talented and not being able to get something to show for it? He doesn’t want it to be there for individual stuff. He knows the team depends on him to do certain things.”

eencina@baltsun.com

twitter.com/EddieInTheYard