PITTSBURGH (AP) — St. Louis Cardinals manager Mike Matheny encourages his players to be aggressive on the base paths and the mound. The line between aggressive and careless is thin. Baseball's hottest team crossed it in a 7-5 loss to the Pittsburgh Pirates on Saturday night.

The Cardinals ran into a rare triple play early then rallied to take the lead before starter Carlos Martinez and reliever Seth Maness let it slip away as first-place St. Louis saw its seven-game winning streak over the Pirates end.

"Everything's not going to fall in line," rightfielder Jason Heyward said. "Everything's not going to be there every night but that's a part of the season."

It was a rare hiccup against the Pirates, whom St. Louis has dominated of late, including a three-game sweep at home last week. For a night, Pittsburgh punched back.

Martinez (3-1) took his first loss of the season after working 5 1-3 erratic innings. He struck out seven but also walked four, including two in the sixth loaded the bases with no outs. Maness came on to get a ground ball and instead gave up a go-ahead two-run double to Jordy Mercer and a sacrifice fly to Corey Hart.

"He's made so many good pitches in situations like that, he's been so good getting us out of a jam," St. Louis manager Mike Matheny said. "We needed a double play, couldn't risk another walk right there, and Seth's our guy."

Usually, so is Martinez. The 23-year-old ran into trouble when he started trying to bring a little too much fire to the plate.

"Sometimes he gets feeling good and wants to turn it another gear," Matheny said. "The other gear, really, doesn't play well for him. Turns into bad counts, turns into walks, turns into runs."

Matt Holliday went 3 for 4 for the Cardinals. Heyward and Jhonny Peralta added two hits each. Both were on base in the second inning when Yadier Molina hit into the franchise's first triple play in nearly 12 years.

The Pirates took an early 3-0 lead in the second but St. Louis pushed around Pittsburgh starter Vance Worley in the fourth. Four singles, two doubles — including one by Heyward that plated two runs — gave the Cardinals a 5-3 lead.

For once, it didn't hold up. Neil Walker pulled Pittsburgh within 5-4 with a solo shot in the fifth and Martinez's control abandoned him in the sixth. A single and two walks loaded the bases for Mercer with one out. Maness came on but Mercer drilled an offering to center. Mercer clapped his hands as reached second with his biggest hit of the season.

Rob Scahill (1-2) earned the win in relief. Mark Melancon worked a perfect ninth for his sixth save.

TRIPLE TROUBLE

The game was scoreless in the top of the second when the Cardinals had second and third with no outs. The momentum disappeared in seconds.

Molina lined to second baseman Walker for an out. Instead of stepping on second to double-up Heyward, Walker threw to third to nab Peralta instead. Heyward, who was mere feet from the third-base bag started walking off the field thinking the inning was over. Pittsburgh third baseman Jung Ho Kang pirouetted with the ball in his hand, briefly confused, before throwing back to Walker on second for the final out.

"I kind of realized (Walker) caught it, I just kind of had a sixth sense of 'all right, he caught this ball,'" Heyward said. "But what I didn't know is he didn't touch the base yet, because it was behind me obviously. But then once that happened, it was too late to get back."

It was second triple play by the Pirates in as many years. St. Louis last hit into one when Atlanta shortstop Rafael Furcal made an unassisted triple play on Aug. 10, 2003.

TRAINER'S ROOM

Cardinals: 3B Matt Carpenter remained in St. Louis dealing with extreme fatigue. Matheny said he did not talk to Carpenter on Saturday. Carpenter is expected to rejoin the team on Tuesday in Cleveland. ... LHP Marco Gonzalez lasted just 2 1-3 innings in a rehab start for Triple-A Memphis on Saturday. Gonzalez, out since April 22 with a pectoral injury, gave up four runs before being pulled after throwing 56 pitches.

Pirates: LF Starling Marte left the game after the third inning with what the team called "extreme dizziness." Marte struck out twice in two plate appearances and was replaced by Sean Rodriguez.

UP NEXT

The series concludes on Sunday when Pittsburgh's Jeff Locke (2-2, 4.85) faces St. Louis' Tyler Lyons (0-0, 6.23 ERA). Locke is 2-2 with a 3.76 ERA in five starts against St. Louis. Holliday is 5 for 12 against Locke with a homer and four RBI. Lyons will make his second start for the Cardinals. He gave up four runs in 3 1-3 innings against the Cubs last week.

.