Updated

MIAMI (AP) -- Steven Matz pitched seven innings and two relievers completed a seven-hitter to help the New York Mets beat the Miami Marlins 8-0 on Wednesday night.

Asdrubal Cabrera and Curtis Granderson each hit a two-run homer in support of Matz (2-1), who allowed six hits, all singles, and one walk while lowering his ERA to 2.67 in four starts this year.

Matz's performance gave the rotation a welcome lift hours after right-hander Robert Gsellman became the sixth Mets starting pitcher to go on the disabled list this season. Gsellman strained his left hamstring Tuesday.

Cabrera hit his seventh homer in the first inning, and Granderson connected for his 12th in the seventh -- and his eighth this month. The Mets have 50 homers in June, the most in a calendar month by any team since 2006.

Jose Reyes had three hits to hike his average to .202. The Mets have won four of their past five games while outscoring opponents 35-14.

Jeff Locke (0-4) allowed three runs, all in a 32-pitch first inning, but settled down to last 5 2/3 innings. He retired 12 in a row after his rocky start but fell to 0-3 with a 6.20 ERA in five career starts against the Mets.

Second baseman Cabrera and shortstop Reyes made fine defensive plays for New York, robbing Miami of hits, and the duo combined to turn two double plays.

Granderson led off the game with a walk, Cabrera followed with his homer, and Reyes added a two-out RBI single in the first.

Granderson homered off Justin Nicolino, making his first relief appearance of the year after being dropped from the rotation.

Matz retired the side in order only once but went seven innings for the third time in four starts after spending the early part of the season on the DL with elbow inflammation. He threw 110 pitches.

Brandon Nimmo pinch-hit for Matz in the eighth and delivered a two-run single for his first RBIs of the year.

The shutout was the third for the Mets this season, and the third time Miami has been blanked.

TRAINER'S ROOM

Mets: OF Michael Conforto (bruised left wrist) again sat out.

UP NEXT

Mets RHP Seth Lugo (2-1, 3.72 ERA) is scheduled to start the rubber game of the series Thursday against RHP Jose Urena (6-2, 3.33 ERA), who has an ERA of 1.50 in his past three starts.