St. Louis, MO (SportsNetwork.com) - Carlos Martinez pitched seven strong innings as the St. Louis Cardinals grabbed a 3-1 win over the Los Angeles Dodgers in a rubber match of a three-game series.

Martinez (5-2) allowed just one hit and walked three while striking out eight. Jhonny Peralta hit a two-run homer and drove in three for the Cardinals, who have won six of their last seven.

"This was one of his best outings yet," said St. Louis manager Mike Matheny about Martinez. "From the first pitch to the last one, he turned it up a notch. He was very consistent with all his pitches."

Joc Pederson's solo home run in the eighth accounted for the only offense for the Dodgers, who have lost three of their last four. Brett Anderson (2-3) gave up a pair of runs on five hits in six innings to take the loss.

"That may have been the worst stuff I've ever had in the big leagues," said Anderson. "There's not many moral victories in this game but the fact that I gave the team a quality start with my "D" stuff, I can take a little something away from that."

St. Louis got the only runs it needed in the first inning, as Matt Carpenter singled with one out and Peralta followed with his eighth home run of the season for a 2-0 lead.

Los Angeles didn't have a runner advance past second base until the eighth inning, when Pederson hit his 13th home run of the season.

Walks to Jon Jay and Carpenter in the bottom of the eighth were followed be a single from Peralta for a 3-1 lead.

Trevor Rosenthal pitched around a pair of two-out walks in the ninth for his 15th save of the season.

Game Notes

St. Louis hosts Milwaukee for three games beginning Monday ... Los Angeles starts a four-game set in Colorado on Monday ... Martinez hasn't allowed a run in his past three starts, spanning 20 1/3 innings.