ST. LOUIS -- Jhonny Peralta broke an eighth-inning tie with a sacrifice fly, and the St. Louis Cardinals beat the San Diego Padres 2-1 Saturday to stop their 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.
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.
Brandon Maurer (5-1) took the loss.
The Cardinals improved to 52-28 overall and 30-11 at home, both marks the best in the majors. They have won seven times this season by a score of 2-1.
Martinez allowed eight hits and one run. He struck out five and walked two.
Padres starter Odrisamer Despaigne gave up one run and four hits in five-plus innings.
St. Louis tied the game in the sixth on a double by Pham and a run-scoring single by Carpenter. It was Pham's first hit in his eighth big league at-bat.
Yangervis Solarte homered in the fourth, his fourth of the season and second of the series.
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.