Updated

St. Louis, MO (SportsNetwork.com) - Lance Lynn pitched into the seventh inning and the St. Louis Cardinals grabbed a 3-2 win over the Miami Marlins in the opener of a three-game set.

Lynn (9-6) gave up five hits and three walks while striking out six over 6 2/3 scoreless innings for the Cardinals, who have won three straight. Yadier Molina and Oscar Taveras each drove in a run.

"I had really good fastball command out there today," said Lynn. "I was able to mix in breaking pitches as we went then I got that sinker in there, too."

Nathan Eovaldi (5-4) pitched six innings and allowed three runs on six hits for the Marlins, who have lost their past two.

The Cardinals got a leadoff double from Matt Carpenter to start the sixth inning. Matt Holliday followed with a single to put runners on the corners and a wild pitch from Eovaldi brought home the first run of the game.

After Jhonny Peralta flied out, Molina doubled home another run, and Taveras followed with a ground-rule double for a 3-0 lead.

"I thought he was good and I would have loved to see him get through the sixth there," said Miami manager Mike Redmond. "But that's been a real tough inning for our young guys here and it was again tonight."

Miami left runners at first and second in the first inning, while Ed Lucas was stranded at second after leading off the sixth with a double.

A pair of walks by Miami in the seventh saw Lynn get replaced with two outs in the inning, and Sam Freeman got Christian Yelich to ground out and end the frame.

Pat Neshek came on in the eighth for St. Louis and got the first two outs before Casey McGehee singled and advanced to second on a wild pitch. Garrett Jones then hit a single to shallow center to put runners on the corners, but Neshek struck out Jarrod Saltalamacchia to end the frame.

Trevor Rosenthal was on the mound in the ninth to close the game, but got into trouble as the first three batters reached base on a pair of singles and a hit-by-pitch.

Yelich then lofted a fly ball to left that went off the glove of a sliding Holliday to bring home the first run. Lucas then struck out and Giancarlo Stanton worked a full count before taking ball four to make it a 3-2 game.

Rosenthal, though, got McGehee to hit into a 5-4-3 double play to end the game and pick up his 26th save of the season.

Game Notes

Before the game, the Marlins placed outfielder Derek Dietrich on the 15-day disabled list and recalled outfielder Jake Marisnick from Triple-A New Orleans ... Miami fell to 11-11 on the Fourth of July, while the Cardinals improved to 91-92-2 ... McGehee has an 11-game hitting streak.