Updated

Jedd Gyorko went 3-for-5 with a three-run homer to help lead the San Diego Padres to a 5-2 win over the Pittsburgh Pirates on Tuesday.

Tommy Medica added an RBI single and ex-Pirate Ronny Cedeno had three hits and a run scored against his former team.

Eric Stults (9-13) allowed two runs on seven hits while fanning five over five innings to earn his first win since July 14.

"It's definitely good to get (a win)," Stults said. "It's one of those things that maybe it'll be a little confidence boost, I've thrown some games where I've had some tough luck and others where I've put in a position to win and it just didn't happen."

Marlon Byrd drove in a pair of runs for the Pirates, who trail the St. Louis Cardinals by a one game for the top spot in the NL Central. The Cardinals beat the Colorado Rockies 11-4 on Tuesday.

Despite the loss, Pittsburgh holds a healthy lead for the top NL Wild Card spot.

Jeff Locke (10-6) allowed four runs on seven hits over five innings to absorb the loss.

"Everybody's aware of where we are, what's going on," Pittsburgh manager Clint Hurdle said "At the end of the day, we had a couple of opportunities we didn't capitalize on."

Pirates outfielder Starling Marte returned to the starting lineup for the first time since suffering a left hand contusion on Aug. 18 and went 1-for-3. He was activated from the DL on Sept. 17, but only appeared as a pinch runner and defensive replacement.

Gyorko's homer in the third inning gave the Padres all the scoring they would need. Back-to-back singles from Chris Denorfia and Will Venable set the table for Gyorko, who blasted his 19th long ball of the year over the wall in left field.

The Pirates, though, countered with a pair of runs in the home half to pull within 3-2. With runners at second and third with two outs, Byrd lifted what appeared to be a routine fly ball to right field. Padres right fielder Kyle Blanks slipped, allowing it to drop in to score Locke and Andrew McCutchen.

Cedeno scored on Denorfia's groundout in the fourth and Medica singled home Gyorko in the seventh to make it a three-run game.

Luke Gregerson worked a scoreless ninth to pick up his fourth save of the season.

Game Notes

Gyorko played his college ball for nearby West Virginia University ... Cedeno played for the Pirates from 2009-2011 ... The Padres were 2-for-10 with runners in scoring position ... Stults had dropped six straight decisions entering the contest ... The Pirates' magic number for clinching a playoff spot is six ... Pittsburgh was 2-for-5 with RISP ... The Pirates' Pedro Alvarez stole his second base of the season.