CHICAGO _ The Padres started a new month by ending a season-long losing streak.
Robbie Erlin went five solid innings in his first start since May 21, Austin Hedges hit a three-run home run in the sixth inning, and the Padres halted a seven-game skid by beating the Cubs a 6-1 on Thursday at Wrigley Field.
Coming off a July in which they went 5-20, the worst month by a Padres team since August of the franchise's inaugural season in 1969, Padres players held a pregame meeting they said was to help regain a positive outlook and help them stop dwelling on past failures.
Maybe that put them in the right frame of mind to come back after they wasted a prime scoring opportunity in the second inning and fell behind 1-0 on an overturned call at the plate in the fifth.
Whatever it was, the Padres put together the consistent quality at-bats that have been so elusive much of the season and weren't buried by their starting pitcher as they were all but a handful of times last month.
Hedges' line drive over the wall and just inside the left-field foul pole came on the first pitch he saw in the sixth inning _ immediately after Christian Villanueva blooped a broken-bat single into right field on the 11th pitch of his at-bat. Villanueva's hit moved Eric Hosmer, who had walked, to third base.
Hosmer's single in the seventh inning scored Manuel Margot to increase the lead. Back-to-back doubles by Freddy Galvis and A.J. Ellis made it 5-1 in the eighth, and a single by Travis Jankowski and grounder by Manuel Margot scored Ellis with the game's final run.
It was the first time the Padres scored in three consecutive innings since July 5 _ a span of 22 games.
Before all that scoring, Erlin did what he couldn't in his first two starts of the season _ pitch as if he was still in the bullpen.
Erlin entered the game with a 14.14 ERA in two starts and a 2.05 ERA in 27 appearances as a reliever.
On Thursday, he allowed one run on two hits in his five innings _ not only his longest start but five fewer hits and five fewer runs than in his previous two starts.
Of his season-high 79 pitches, 54 were strikes.
The Cubs' only run off him came after Willson Contreras led off the fifth inning with a walk, went to third on Addison Russell's one-out single and scored on a grounder by pitcher Mike Montgomery that at first was ruled an inning-ending double play.
Contreras took off for home after Erlin fielded Montgomery's comebacker and threw to second base, where Galvis got the force out and then fired home to Hedges with a throw that beat Contreras. Home plate umpire Shane Livensparger called Contreras out, but a replay review showed Contreras had deftly avoided Hedges' tag with his left hand while reaching around to touch the plate with his right hand.
Erlin (2-3) left the game after that inning having become just the third Padres starter in the past 26 games to go five innings and allow fewer than two runs.