Jose Berrios lost a 10-pitch battle with Jake Lamb in the first inning Saturday, walking him.

Five-time All-Star Paul Goldschmidt dug in at the plate and proceeded to foul off pitch after pitch, as Berrios couldn’t finish him off. Finally, Goldschmidt struck out on a foul tip, and Berrios pounded his fist into his glove as he walked off the mound.

It was a laborious 24-pitch first inning, but do you remember what happened in the first inning of his previous two starts? Berrios sure hasn’t. And when faced with pitching himself into another early pickle, he bowed his back and stopped it.

“They both are having great seasons,” Berrios said of Lamb and Goldschmidt. “… It gave me a lot of energy and put me back into the game.”

It began a run of seven scoreless innings for Berrios, as the Twins defeated Arizona 5-0 for their ninth victory in their past 12 games.

Twins hitters had their hands full with longtime AL Central nemesis Zack Greinke until they chased the righthander with a five-run fourth, his shortest start since Aug. 14, 2016.

Most of Twins manager Paul Molitor’s postgame message centered on Berrios, who began the season 7-1 with a 2.67 ERA before going 3-4 with a 6.20 ERA in nine starts entering Saturday. He gave up five first-inning runs in each of his previous two outings, and this time he vowed to be more aggressive in the strike zone. He attacked with his fastball more and didn’t mix in his changeup until the second time through the order.

Molitor also felt his young righthander was energized by fighting through the first inning unscathed. In seven innings, Berrios gave up two hits and one walk while striking out seven, and he retired his final 13 batters.

Alan Busenitz finished up with two perfect innings as the Twins produced their ninth shutout of the season.

“If there was a first-inning hurdle, he leaped over it,” Molitor said of Berrios, “and he just seemed to get stronger.”

While Berrios was tested in the top of the first, Greinke (14-6) threw 30 pitches in the bottom of the inning. Brian Dozier worked Grienke over for 16 pitches during his first two plate appearances.

Greinke still was Greinke, throwing 69-mile-per-hour breaking balls before trying to blast fastballs past hitters, grunting as he released each pitch. But the Twins extended many at-bats, which had a cumulative effect by the fourth inning. Daniel Descalso’s glovework didn’t help either.

With a runner on first, the Diamondbacks second baseman botched Eduardo Escobar’s grounder for an error, missing a chance at a double play. One out later, Jorge Polanco singled to load the bases, and Jason Castro drew a four-pitch walk, forcing in the first run of the game.

A second run scored on Dozier’s infield hit. Max Kepler drove in two runs with a single to right, and Joe Mauer’s single through the hole at short scored Dozier to make it 5-0.

“We did make him work,” Molitor said of Greinke. “It’s been a somewhat recurring theme for our team. We seem to get pitch counts up there. With a guy like that, you take advantage.

“Kepler delivered probably the biggest hit of the night. It spread it out a bit.”

The inning ended with a Miguel Sano double-play grounder, on which he barely jogged to first. He was soon pulled because of an injured lower left shin and is day-to-day.

Molitor said Sano reported soreness Friday, when he hit two home runs, though it’s not known how he was injured. Because of the injury, the Twins used him at designated hitter Saturday.

“Obviously it’s bothering him,” Molitor said. “You can see how he ran down to first base. We got him out and we are going to run some tests in the morning and see how he’s doing.”