ST. LOUIS — San Diego right-hander Odrisamer Despaigne changed his approach slightly Saturday and for the most part it worked.
The San Diego defense committed an error allowing an unearned run in the eighth inning that helped the St. Louis Cardinals to a 2-1 win in the third game of the four-game set.
"I wanted to be a little more aggressive, try to go after the hitters," he said through a translator.
Despaigne allowed one earned run on four hits over five-plus innings and left with the game tied 1-1.
"He was great," manager Pat Murphy said. "He had a great plan and (catcher Derek) Norris called a great game. (Despaigne) was feeding off the way the team is going."
Despaigne had given up 12 earned runs in his previous three starts covering 16 2-3 innings.
"Today, everything was working, just one bad inning," Despaigne said. "Hitters sometimes make adjustments. I feel good with the way I pitched."
Despaigne lowered his ERA from 4.94 to 4.75. His last win came May 31 in a 7-1 triumph over Pittsburgh.
St. Louis rookie outfielder Tommy Pham scampered home with the winning run on a sacrifice fly by Jhonny Peralta in the eighth inning to stop the Cardinals longest losing streak of the season at four games.
Carlos Martinez threw 6 2-3 solid innings, and Seth Maness (3-0) got the win. Trevor Rosenthal closed for his 24th save in 25 opportunities, getting Matt Kemp to ground out with a runner on to end it.
Rosenthal had a 23-game scoreless string halted on Friday.
San Diego won the first two games of the series, including a 2-1 victory Friday. All four losses during St. Louis' skid came at home.
Pham recorded a trio of personal firsts in second career start including his first stolen base and first runs scored.
"This is a special (day). I will always remember it," Pham said. "It means a whole lot, just to be up here and contributing."
Pham, recalled Friday from Triple-A Memphis, reached on an error by shortstop Alexi Amarista to start the eighth. He stole second on the first pitch and went to third on a sacrifice by Matt Carpenter.
Peralta then hit a two-strike fly to right to bring in the go-ahead run. Pham barely beat the throw from Will Venable with a headfirst slide, hooking his hand on the plate.
"We were waiting for somebody to do something and he did it," Peralta said. "I felt it was deep enough when I hit the ball. He's a pretty good runner."
St. Louis manager Mike Matheny inserted Pham into the leadoff spot hoping he could kick-start a slumping offense that had managed just six runs in its previous four games. Pahm scored both runs.
"We put him in a tough spot to see how he was going to respond," Matheny said. "It was nice to see that first hit. In the eighth, he comes out of the box hard and that put pressure on the defense.
He was good. He was just what we needed today."
Brandon Maurer (5-1) took the loss, his first career setback in relief. His last loss came May 29, 2014 against the Los Angeles Angels.
The Padres were looking for their first three-game winning streak since June 2-5.
"This is a tough loss when you've got a little momentum going," Murphy said. "The relief corps was great. It comes down to a tough error."
Jedd Gyorko had a season-high three hits for the Padres. He has hit safely in 12 of 16 games against St. Louis in his career. Amarista broke an 0 for 11 skid with a single in the fifth inning.
Padres C Derek Norris was in the lineup despite spraining his left shoulder Friday. Norris collided with Cardinals 1B Xavier Scruggs while beating out an infield hit. Norris has started 67 of 83 games behind the plate.
St. Louis RHP Lance Lynn (5-4, 2.74 ERA) will face RHP Ian Kennedy (4-7, 4.86) in the finale of the four-game series Sunday. The Cardinals have scored just 32 runs in 13 of Lynn's 14 starts. Kennedy has allowed one earned run in each of his last four starts.