ST. LOUIS — Jedd Gyorko learned a lot on his recent trip to the minor leagues.
The San Diego second baseman homered in the seventh inning to tie the game and then had a run-scoring single in the ninth to lead the Padres to a 2-1 victory over the St. Louis Cardinals on Friday night.
San Diego won the first two games of the four-game series after losing three straight.
St. Louis lost a season-high fourth straight home game but the Cardinals are still a major league-best 29-11 at home.
Gyorko returned on Tuesday from a stint at Triple-A El Paso, his first minor league assignment since making the Opening Day roster in 2013. He hit .135 in April with the Padres.
"Getting to play every day down there and getting some steady at-bats helped a lot," Gyorko said. "I kind of got in tune with my swing the way it used to be."
Gyorko, who went 2 for 4, is 4 for 15 in the four games since being recalled.
San Diego manager Pat Murphy says Gyorko returned a totally different player.
"He's way more confident," Murphy said. "He knows we believe in him and I'm excited about what he's doing. In his at-bats, seven or eight have been hard contact."
Gyorko hit a 3-2 pitch from closer Trevor Rosenthal (1-1) to drive home Yangervis Solarte, who hit a one-out triple. The RBI brought an end to Rosenthal's 23 2-3 innings scoreless streak.
"That guy is tough," Gyorko said. "I was kind of battling, fouling off the pitches that were close. I finally got a barrel on the last one."
Rosenthal was philosophical about the end of the 23-appearance run.
"It was actually a slider," Rosenthal said. "It was not a good pitch. I tried to go away with it."
Joaquin Benoit (5-3) picked up the win in relief.
Craig Kimbrel recorded his 21st save in 22 opportunities. He got Jason Heyward to ground into a game-ending double play.
St. Louis starter Michael Wacha, in his first career appearance against the Padres, gave up one run and five hits in seven innings. He struck out six and walked one.
"I felt like I had good fastball command," Wacha said. "I was just trying to fill up the strike zone and let the defense play behind me."
San Diego starter Andrew Cashner allowed one run and three hits in six innings.
"They're a good team, they grind it out," Cashner said. "We just haven't made a lot of mistakes since we've been here."
The Cardinals scored in the fifth inning on a double-play groundout by Xavier Scruggs. Heyward and Yadier Molina singled to start the rally. Randal Grichuk coaxed a nine-pitch walk after falling behind 0-2 to load the bases.
Justin Upton of the Padres broke an 0-for-17 skid with a single in the sixth.
Cardinals: OF Jon Jay was placed on the 15-day DL retroactive to July 1 with a stress reaction in his left wrist. Jay was hitting .223 with one homer and 10 RBIS. He is on the DL for the second time this season with an earlier stint from May 14-28 with left wrist tendinitis.
Padres: INF Will Middlebrooks did not start for the fourth straight game after rolling his ankle Sunday against Arizona. Middlebrooks pinch hit on Tuesday and Thursday.
St. Louis RHP Carlos Martinez (9-3, 2.80) will face RHP Odrisamer Despaigne (3-6, 4.94) in the third game of the four-game set on Saturday. Martinez leads the Cardinals with 100 strikeouts. Despaigne has allowed eight earned runs over his last two starts covering 11 innings.