PITTSBURGH (AP) -- Carlos Martinez came within two outs of his first career complete game and wasn't upset after falling short.
If he keeps throwing like he did Saturday night, he'll finish nine innings eventually.
Martinez notched his third consecutive win and Matt Holliday had a three-run homer among his three hits as the St. Louis Cardinals beat the Pittsburgh Pirates 5-1.
The Cardinals won for the sixth time in seven games. Pittsburgh lost its fourth in a row.
Martinez (7-5) gave up one run and six hits in 8 1/3 innings before being lifted when the Pirates put runners on first and second with one out.
''I always want to go out there and do my work for all nine innings,'' Martinez said. ''That's why I do all the extra work (between) starts, so I can stay strong and stay out there as long as possible.''
Trevor Rosenthal got two outs for his 12th save in 14 opportunities. He blew a save in the ninth inning Friday night in a game the Cardinals eventually won 9-3 in 12 innings.
''Crazy things happen to us in this park, so when they get it within that kind of distance, and Trevor can come in and shut the door, he's going to,'' Cardinals manager Mike Matheny said.
Matheny was impressed by Martinez, who threw 122 pitches in his 49th career start. He struck out five, walked three and induced three double-play grounders with a sinker that regularly reached 96 mph.
''It's freakish to be able to throw that hard with that kind of movement,'' Matheny said.
Before starting his winning streak, Martinez lost five straight starts.
''It really hasn't any big changes,'' Martinez said. ''I'm just trying to stay focused and make small adjustments.''
Holliday's 10th home run capped a four-run fifth inning against Francisco Liriano (4-6), who lost to the Cardinals for the just the third time in 10 decisions, and made it 4-0.
Holliday wanted to talk more about Martinez's outing than his own hitting feats.
''He was still throwing 96 mph in the ninth inning with over 100 pitches and he has two plus breaking pitches,'' Holliday said. ''He's got top two, top three stuff in the league. He's got Cy Young-caliber stuff.''
Brandon Moss led off the fifth with a double, advanced to third on a wild pitch and scored when Jedd Gyorko struck out but reached first base on Chris Stewart's passed ball. Two outs later, Aledmys Diaz walked and Holliday followed with a drive to right-center field.
''(Liriano) was pitching really well and he gives us fits,'' Holliday said. ''For us to get him for a four spot, obviously with the way Carlos was pitching, we felt pretty good at that point.
Moss had his fifth straight multi-hit game.
Liriano was pitching on extra rest as he started for the first time since June 3 but still fell to 1-5 in his last six outings. The left-hander gave up four runs - three unearned - and four hits in six innings with eight strikeouts and three walks.
''He was good in a lot of different places,'' Pirates manager Clint Hurdle said. ''He repeated the delivery really well. Stayed on line throughout the delivery really well. Had a good mix of pitches throughout the game.''
Starling Marte had three hits and is 14 for 34 (.412) against the Cardinals this season.
Jhonny Peralta's RBI single in the seventh extended the Cardinals' lead to 5-0. The Pirates got their run in the bottom half when Gregory Polanco doubled and scored on Josh Harrison's sacrifice fly.
Pirates: C Francisco Cervelli was put on the 15-day disabled list after undergoing surgery to repair a broken bone in his left hand. He is expected to be sidelined four to six weeks. Stewart is likely to get the bulk of the playing time behind the plate, though he left the game in the seventh inning with left ankle discomfort. ... RHP Gerrit Cole (strained right triceps) underwent an MRI exam on Saturday after leaving Friday night in the third inning. The Pirates expect to receive the results Sunday.
Cardinals: RHP Mike Leake (4-4, 4.22 ERA) is scheduled to start Sunday in the finale of the three-game series. He is 7-1 in his last 16 starts at Pittsburgh, dating to Sept. 11, 2012.
Pirates: LHP Jon Niese (6-2, 3.95) is 3-0 with a 1.74 ERA in his last five starts. He pitched seven shutout innings in his previous outing Tuesday to beat the New York Mets.