MIAMI (AP) — Maybe the St. Louis Cardinals were looking ahead to the Chicago Cubs.

In a matchup of worst versus first, NL Central leader St. Louis mustered only five hits Sunday and lost to the woeful Miami Marlins. 7-2.

The Cardinals dropped two of three games in Miami — the first series they've lost since April 26-28 against Pittsburgh. They went 5-4 on a three-city trip and open a homestand Monday against the traditional rival Cubs.

The Marlins climbed above .300 at 21-47, still baseball's worst record.

"We didn't see it," St. Louis manager Mike Matheny said. "The team we saw is hitting the ball and making good pitches."

The Cardinals didn't do enough of either. Tyler Lyons (2-3), making his fifth major league start, lost for the third time in a row after winning his first two decisions.

Lyons gave up six runs in 5 1-3 innings.

"I made some mistakes with guys on base," the rookie said.

The Cardinals, who have the lowest ERA in the majors, gave up 19 runs in the series. Meanwhile, they managed just three hits and one run against Ricky Nolasco, who pitched seven innings.

St. Louis scored a run in the ninth and loaded the bases with two out, but Steve Cishek came to strike out pinch-hitter Matt Holliday looking to end the game.

Matheny liked the comeback bid.

"These guys have always shown that — they don't give up," Matheny said. "They keep coming. That will pay off in the long run."

Aside from the ninth inning, the Cardinals did little. All of their hits were singles, and with Holliday and NL batting leader Yadier Molina out of the starting lineup and given a day to rest, St. Louis went down in order in five of the first six innings.

Carlos Beltran finished 0 for 4 to end the longest active hitting streak in the majors at 14 games. Matt Carpenter was also hitless and went 7 for 38 (.184) on the trip.

Jon Jay and Matt Adams drove in St. Louis' runs. Right fielder Giancarlo Stanton made a leaping catch at the fence to rob Adams of an RBI and an extra-base hit in the seventh.

"With that lineup, probably among the top three in the league, you just have to stay focused," Nolasco said. "You can't lose concentration and leave balls over the middle, because they're just going to start crushing you. I was able to get away with some balls that they hit hard, and we had great defense at the same time, so it worked out."

A bout of wildness against the bottom of the order cost Lyons in the fourth inning. He hit Jeff Mathis, who was batting .128, and then Nolasco walked for the first time this year to load the bases. Juan Pierre followed with a two-out, two-run single for a 4-1 Miami lead.

Placido Polanco had three hits starting for the first time in five games after being sidelined by back stiffness. His two-out, two-run double in the fifth made it 6-1.

The abundance of offense was a refreshing change for Nolasco (4-7), who has endured the worst run support of any pitcher with at least 14 starts. Luxuriating in an early lead, he retired 11 in a row during one stretch.

"It helps a ton," he said. "It just changes everything and the way you pitch and your approach."

Pierre drove in two runs and had two hits to extend his hitting streak to 12 games, while Justin Ruggiano added a two-RBI single. The Marlins have won eight of the past 14 games, their best stretch this season.

"To get a win against such a great team and a great lineup, and to play as well as we did, that's a great day for all of us," Marlins manager Mike Redmond said.

NOTES: Miami 1B Logan Morrison (back) took grounders before the game but sat out for the third day in a row. ... Lyons' six strikeouts were a career high. ... The crowd of 18,468 was the largest of the homestand. ... David Freese had one hit, but his lifetime average against the Marlins fell to .462 (18 for 39).