Dr. William Raasch examined Gallardo on Wednesday in Milwaukee and diagnosed a mild strain.
"We were fortunate there," manager Ron Roenicke said. "It was a question whether to put him on the DL. The thing is, he was going to miss one start for sure, maybe two, and now you come into where your bullpen is going to be hurt."
The Brewers already had one extra pitcher on the roster, so they added a position player instead. Second baseman Scooter Gennett, who was already with the team because he served as the 26th man for Tuesday's doubleheader, was technically optioned back to Nashville, by rule, and then returned to the Brewers.
Tyler Thornburg will take Gallardo's place in the pitching rotation, beginning with Monday's game in San Francisco. Thornburg pitched six scoreless innings in Game 2 on Tuesday, the best start of his budding career.
On Tuesday, between games of the Brewers' doubleheader sweep, Gallardo lamented his setback.
"It's the way the year has been," Gallardo said. "For myself, it was probably the best I've felt in a long time overall, mechanics-wise and locating pitches."
Gallardo winced in pain as he limped to the Brewers' dugout with head athletic trainer Dan Wright, who had also visited the mound an inning earlier after Gallardo felt the tweak on his hamstring after making his diving catch. He remained in the game that time, batted in the top of the fifth inning and was pitching to Cubs second baseman Darwin Barney in the bottom of the frame with two outs, the bases loaded and a 2-0 lead when he was forced to exit.
"Even during the All-Star break, I got treatment on it," Gallardo said. "But it was fine. It felt good, and then for some reason when I dove for that ball, [he felt it begin to tighten]."
Reliever John Axford inherited a 1-2 count on Barney, but he surrendered four straight run-scoring hits, including a tying two-run single to Barney and a go-ahead single to Welington Castillo that closed the book on Gallardo. The starter's final line: 4 2/3 innings, six hits, three earned runs, three walks and one strikeout.
When Axford struck out Junior Lake to finally end the inning, the Brewers trailed, 5-2. They came back to win, 6-5.
Two other Brewers pitchers missed time with hamstring strains this season -- starter Marco Estrada, who has been on the disabled list since the first week of June, and closer Jim Henderson, who spent two weeks on the DL in late May and early June. Kyle Lohse also had a hamstring scare in June, but did not miss a start, and Wily Peralta exited a start in Washington last month with a hamstring strain, but made his next start on two extra days of rest.
"I don't know," Roenicke said with a shrug. "It's unusual to see hamstring pulls, especially with pitchers. I don't remember seeing too many guys getting pulls."
"I told the trainers it's my fault because I started the trend," Henderson said. "I find that teams do have one weird injury that happens to a lot of guys. It's weird how it works. ... This is the year of the hamstring. We're even paying attention to it even more, doing preventable stuff to make sure we're strong. We're doing everything we can to prevent this."