PITTSBURGH -- Pedro Alvarez and Neil Walker picked the ideal time to break out of their slumps.
Both hit home runs during a five-run fourth inning to back a dominant Gerrit Cole as the Pittsburgh Pirates whipped the San Diego Padres 10-1 on Thursday afternoon to avoid being swept in the four-game series at PNC Park.
The Pirates, who had been held to four runs in their three losses in the series, entered the day two games out of first place in the National League Central behind the St. Louis Cardinals, who played at the Colorado Rockies. The Pirates moved one game ahead of the idle Cincinnati Reds in the division and wild card races.
The Pirates and Reds open a three-game series Friday night in Pittsburgh.
"It was good to see Pedro and Neal do what they did, but if anyone wants to get hot right now, they are more than welcome to do so," Pirates manager Clint Hurdle said with a grin. "Now would be a good time."
Alvarez was hitless in his previous 18 at-bats when he belted a solo shot, his 34th homer of the season, to center field with one out in the fourth to put the Pirates ahead 2-1.
"The biggest thing was that the home run helped the team win," Alvarez said. "That's really what it's all about, especially this time of the year. We're in the shuffle, we're in the mix with two other good teams and we need every win we can get. It was good to see everybody hitting, up and down the lineup."
After a two-run double by Jose Tabata, Walker blasted a two-run homer, his 11th home run of the season, to right field that increased the lead to 6-1. Walker was on a 3-for-38 skid.
"I honestly don't worry about the numbers," Walker said. "I concentrate on my approach because I know if my approach is good then the hits will eventually come. I've felt my approach been has been good lately, but I just wasn't getting the results."
The home runs provided more than enough support for Cole (9-7), who struck out 12 in six innings. The 23-year-old right-hander allowed one run, four hits and three walks.
It was the most strikeouts by a Pirates rookie since Jose DeLeon fanned 13 Reds on Aug. 20, 1983.
The Padres beat Cole in San Diego on Aug. 21, getting 10 hits off him in six innings. However, Cole was much better this time.
"He was a lot more polished today," Padres catcher Nick Hundley said. "He threw four pitches for strikes, he was running up there to 97, 98, using both sides of the plate. He continues to evolve as a pitcher -- I mean, he threw me changeup, slider, curve, everything, fastball away, fastball in. Any time a guy with that type of stuff starts to pitch that way, yeah, the sky is the limit for a guy like that."
Cole won his third straight start and ran his streak of quality starts to seven. He has allowed two runs or fewer in six of those seven starts and is 3-0 with a 1.38 ERA in four September starts.
"I feel like I'm getting a little better every time out," said Cole, the first overall pick in the 2011 amateur draft who made his major-league debut on June 11. "I'm learning to trust my stuff more up here. I feel like I can go out, command all my pitches and really compete."
Walker finished 4-for-5 with three RBIs. Tabata had two hits and three RBIs. Justin Morneau, Tony Sanchez and Jordy Mercer added two hits each and Alvarez drove in two runs.
The Padres lost for just the fifth time in their last 16 games as Ian Kennedy (6-10) was rocked for six runs and eight hits in 3 2/3 innings, ending his streak of five consecutive starts without a loss. Kennedy is 1-6 with a 5.64 ERA in 17 road starts this season.
"He didn't really command his pitches in the fourth," Padres manager Bud Black said. "He was hanging in there through the first three. They stressed him a bit, but he got out of trouble. He couldn't hold them off in the fourth, though."
Chris Denorfia had two hits for the Padres and scored their lone run in the first inning when he doubled and came home on Tommy Medica's single. San Diego had won 14 of its last 15 games in Pittsburgh.
The Padres bullpen's streak of 15 consecutive scoreless innings ended when the Pirates scored three runs in the seventh and one in the eighth off Anthony Bass to make it 10-1.
NOTES: Pittsburgh LF Starling Marte missed the game after his wife went into labor on Thursday morning with the couple's first child. ... Pirates C Russell Martin, who is 4-for-40 (.100) in September, was rested for a second straight game because Hurdle wants him to start all three games against Cincinnati. ... San Diego RF Kyle Blanks did not start for a second straight game because of illness. ... Padres 3B Chase Headley's six-game hitting streak ended as he went 0-for-4. ... Pittsburgh LHP Francisco Liriano (16-7, 2.29 ERA) will start Friday night against Reds RHP Mat Latos (14-6, 3.14). ... The Padres begin a three-game home series with the Los Angeles Dodgers on Friday night as LHP Robbie Erlin (2-3, 5.18) faces RHP Edinson Volquez (9-11, 5.94), who was released by San Diego last month.