PITTSBURGH (AP) — Carlos Martinez would likely get the Pittsburgh Pirates' vote.

Martinez made his case for inclusion on the National League All-Star team by pitching 7 1-3 scoreless innings Thursday night, and the St. Louis Cardinals beat the Pirates 4-1 in a matchup between the teams with the best records in the major leagues.

Martinez (10-3) scattered four hits while striking out five and walking three in improving to 7-1 with a 1.20 ERA in his last 10 starts.

"Martinez was working the zone, was throwing all his pitches for strikes," Pirates All-Star Andrew McCutchen said. "We didn't square many balls up against him, that's for sure."

The Cardinals' right-hander is one of the five players contending for the NL's All-Star Final Vote. Fan voting ends Friday afternoon and the game will be played Tuesday at Cincinnati.

St. Louis (56-31) opened a 5 1/2-game lead on the Pirates in the NL Central. Pittsburgh (50-35) had its five-game winning streak snapped in the opener of a four-game series.

That was Martinez's main concern.

"The All-Star Game would be nice but I just wanted to go out and pitch as long as I could to help the team win the game," Martinez said. "That's my job."

The Cardinals did their scoring in the fifth inning on two-run singles by Matt Carpenter — with one out — and Molina an out later. Both hits were off Jeff Locke (5-5). Only one of the runs was earned because shortstop Jordy Mercer booted pinch-hitter Kolten Wong's grounder for an error with none out.

Carpenter and Molina finished with two hits each.

McCutchen kept the Pirates from being shut out as he hit a 443-foot home run, his 11th, to center field off Seth Maness to lead off the ninth inning. That extended his career-best hitting streak to 16 games.

Trevor Rosenthal retired the next three hitters for his 26th save in 27 opportunities.

Locke was pulled for a pinch hitter in the bottom of the fifth. He allowed five hits, struck out five and walked three after giving up two earned runs or fewer in each of his previous five starts.

"In that fifth inning, I didn't execute my pitches," Locke said. "This is a good team we're playing. You have to be able to execute if you're going to beat them."

TRAINER'S ROOM

Cardinals: Wong stayed in the game to play the final four innings at second base in his first action since sustaining a mild concussion Tuesday. ... RF Matt Holliday, who has been on the disabled list since June 9 with a strained right quadriceps, might be activated Friday. Matheny said Holliday would be limited to pinch hitting until after the All-Star break.

Pirates: LF Starling Marte did not start for a fourth straight game because of a strained left oblique muscle. He underwent a full pregame workout for the second day in a row but is still day to day.

UP NEXT

Pirates RHP Gerrit Cole (12-3, 2.28 ERA) faces Cardinals RHP Lance Lynn (6-4, 2.53 ERA) on Friday night. Cole leads the major leagues in wins. Lynn is 3-0 with a 1.19 ERA in his last six starts.