Updated

Lucas Duda homered and knocked in two runs to lead the New York Mets to a 5-1 win over the St. Louis Cardinals in the middle test of a three-game set at Citi Field.

David Wright and Marlon Byrd also hit solo shots for the Mets, who snapped a three-game losing streak.

Dillon Gee (5-6) pitched 6 2/3 solid innings, giving up one run on six hits and two hits while striking out seven. He has allowed just one run in each of his last three starts.

"[We were] able to jump on them early and just allow Dillon to go out there and pound the strike zone," Wright said. "The key is always good starting pitching, and we got that tonight."

Allen Craig's home run was the lone score for the Cardinals. Shelby Miller (7-4) had 10 strikeouts, but surrendered a career-high four runs and five hits, including two homers, over six innings.

"He only gave up five hits, but they counted for four runs," manager Mike Matheny said of Miller. "It was another pitcher who had a lot going against him early and kept his composure and gave us a chance."

The Mets struck for two runs in the first. With two outs, David Wright smacked a double to right-center. Murphy and Duda then connected on back-to-back RBI singles. Duda's hit to right field scored Murphy from first base when Carlos Beltran threw the ball to second. Murphy kept chugging around the bases and the throw home wasn't in time.

Duda's 11th home run of the season, a shot to right-center came with one out in the fourth.

The Cardinals finally scored in the sixth, when Craig crushed a 3-2 pitch to left for his second homer of this series. Yadier Molina followed with a double to left, but the Cardinals went hitless the remainder of the game.

In the home half of the sixth, Wright hammered a 3-1 pitch over the wall in center with one out. Seth Maness replaced Miller in the seventh, but gave up a leadoff homer to left from Byrd.

Game Notes

Cardinals third baseman David Freese went 0-for-4 with two strikeouts, snapping a career-long 20-game hitting streak ... Molina went 3-for-4 with two doubles ... The Cardinals were 1-for-6 with runners in scoring position.