MILWAUKEE — A crucial walk to the opposing pitcher ended up spoiling an otherwise quality outing by St. Louis Cardinals rookie Luke Weaver.

Weaver, making his fourth major league start, gave up three runs and four hits in six innings. He struck out 10, including four straight at one point. But it was a walk to Matt Garza with two outs in the third that helped propel the Brewers to a 3-1 victory and end a six-game losing streak.

Jonathan Villar followed Garza’s walk with a double and Kirk Nieuwenhuis then homered to right.

“Really, the one at-bat he’s got to think about is a two-out walk to the pitcher,” St. Louis manager Mike Matheny said. “(Luke) knows that. I don’t need to go remind him. That really cost us right there. That is a shame.”

Garza was 1 for 21 with one walk and 13 strikeouts on the season when he stepped to the plate against Weaver (1-2).

“That one at-bat to Garza is kind of what set it off,” Weaver said. “Just kind of lost a little feel for the ball there, and just lost him. I thought I made a good pitch to Villar, he put a good swing on it. And then that pitch to Nieuwenhuis, he put a great swing on it.”

Garza said he wanted to extend that at-bat against Weaver.

“I was just trying to take as many pitches as possible and keep myself from going back out there really quick,” Garza said. “He threw a good cutter off and I leaned out there. I was telling myself, ‘I’d rather you punch out looking than swinging at something in the dirt.'”

Garza (5-6) turned in his longest outing of the season, giving up one run and three hits in seven-plus innings while walking two and striking out eight.

“We hit a few balls hard, but for the most part (Garza) made pitches when he had to,” Matheny said. “He has always had good stuff.”

Garza allowed the first two batters in the eighth to reach base before being replaced by Carlos Torres, who pitched out of the jam but not before loading the bases with two outs.

Yadier Molina hit a solo home run in the fourth for the Cardinals giving them a homer in a franchise-record 20 consecutive games.

The Brewers loaded the bases with one out in the sixth but failed to score off Weaver, who struck out Keon Broxton looking to end the inning.

Tyler Thornburg notched his sixth save in 10 chances.

STRIKING OUT

The Brewers struck out 43 times in the three-game series against St. Louis, including a franchise-record 19 times on Monday, 12 in a 10-inning contest on Tuesday and another 12 on Wednesday.

“We really did a good job with the game plan, and we got them to chase some pitches,” Weaver said.

TRAINER’S ROOM

Cardinals: 1B Matt Adams, on the DL with left shoulder inflammation, could soon return to the lineup. Adams is “getting healthy and getting close,” Matheny said.

Brewers: Manager Craig Counsell said OF Domingo Santana is healthy despite being out of the starting lineup for the third consecutive game. Santana missed games in May with a sore shoulder. An ailing right elbow kept him out of the lineup from the first week of June until earlier this month.

UP NEXT

Cardinals: Alex Reyes (1-0, 0.64 ERA) will make his second major league start when St. Louis starts a three-game series at Cincinnati on Friday. He had a no-decision in his first start on Saturday against Oakland, allowing one run and two hits in 4 1/3 innings.

Brewers: Junior Guerra (7-3, 2.93) will return to the rotation when Milwaukee opens a three-game series at Pittsburgh on Friday. Guerra had been on the DL with right elbow inflammation. He is 1-0 with a 1.72 ERA in three career games (two starts) against the Pirates.