NEW YORK (AP) Daniel Murphy drove in two runs with a tiebreaking single in the seventh inning, and the New York Mets rallied for a 4-2 victory over Colorado on Monday night after top Rockies pitching prospect Jon Gray was lifted after six innings.

The Mets wasted three-run leads in two straight losses to Tampa Bay last weekend, then went ahead against Colorado on Travis d'Arnaud's first homer since June 20. It was the only hit for the NL East leaders off Gray, the hard-throwing right-hander making his second major league start.

But Carlos Gonzalez hit a two-run shot in the fourth off Jonathon Niese (7-9), reaching to the outside corner of home plate and sending a drive the opposite way to left-center with DJ LeMahieu aboard. It was Gonzalez's 13th long ball since the All-Star break.

More from FoxSports

The Mets loaded the bases against Justin Miller (1-1) in the seventh after Gray, the No. 3 overall draft pick in 2013, was pulled after 75 pitches. The rookie is on a strict innings and pitch limit as the Rockies look ahead to 2016 for the budding ace, manager Walt Weiss said.

Miller gave up a single to d'Arnaud, walked Michael Conforto and then Ruben Tejada as well with two outs. Boone Logan entered and hit Curtis Granderson with a full-count pitch to tie it.

Murphy then grounded a single past diving shortstop Jose Reyes, the former Mets star recently acquired in the trade that sent Troy Tulowitzki to Toronto, for a 4-2 lead.

New York improved to 39-18 at Citi Field this season.

The Mets entered Monday with a 1 1/2-game lead over Washington thanks to some help from the Rockies, who rallied for two wins against the Nationals this past weekend.

Niese gave up six hits and two runs without walking a batter in seven innings. It was the 11th time in 12 starts that he went at least six innings.

Tyler Clippard pitched a perfect eighth and Jeurys Familia notched his 31st save with a 1-2-3 ninth.

TRAINER'S ROOM

Rockies: OF Charlie Blackmon was out of the starting lineup. Weiss said Blackmon has been playing with a minor ankle injury, but it's not serious. He entered in a double switch during the seventh inning.

Mets: 3B David Wright (back) went 1 for 3 with a walk in his first rehab game since going on the disabled list April 15 with a hamstring injury. He was set to serve as the DH for Class A St. Lucie. If all goes well, he'll play third base Tuesday. ... Mets rookie LHP Steven Matz (lat strain) is scheduled to throw 25 pitches in a rehab start for St. Lucie on Saturday.

UP NEXT

Rockies: LHP Chris Rusin is looking for his first win since June 21, a span of seven starts and eight appearances. The 28-year-old Rusin is 1-3 with a 5.40 ERA on the road.

Mets: Matt Harvey is coming off seven scoreless innings at Miami. He hasn't walked a batter in 20 2-3 innings.