MIAMI (AP) — The Miami Marlins are last in the majors in home runs. When they do hit them, they’ve made them count.

Garrett Cooper, Curtis Granderson and Brian Anderson all homered and drove in two runs to power the Marlins to an 8-4 victory over the New York Mets on Friday night in the first game after the All-Star break for both clubs.

“I think we had a good approach,” Anderson said. “We started off kind of slow but we were eventually able to get some mistakes over the plate. We stayed within ourselves and ended up barreling up some balls and getting them out.”

The Marlins improved to 14-2 when hitting at least two home runs in a game and beat the Mets for the fourth straight time.

“A lot of good stuff,” Marlins manager Don Mattingly said.

Miami’s Caleb Smith (5-4) pitched six innings, allowing two unearned runs and three hits. He struck out six and worked around a season-high five walks.

“I felt more relaxed,” Smith said. “I felt like I was hitting my spots and keeping them off balance and mixing my fastball in.”

Granderson and Cooper hit back-to-back home runs as part of a four-run third inning for the Marlins off Jason Vargas (3-5) to take a 4-2 lead.

“After they got the two I thought that bounce-back inning was huge,” Mattingly said.

It was Granderson’s eighth of the season, Cooper’s ninth.

Granderson and Cooper also keyed another rally for the Marlins in the sixth. Granderson led off with a walk and Cooper hit a double off the glove of center fielder Michael Conforto on a deep fly ball, scoring Granderson and ending Vargas’ outing.

Anderson immediately followed with a two-run homer, his 12th, off Robert Gsellman to give the Marlins a 7-2 lead.

Starlin Castro added an RBI triple in the eighth to cap the scoring for the Marlins.

“They scored seven runs on four pitches that we just did not execute,” Mets manager Mickey Callaway said. “We’ve got to execute pitches in big situations and we didn’t.”

The Mets took an early lead on a two-run single by Wilson Ramos.

Todd Frazier hit a two-run homer in the ninth for the Mets.

Vargas allowed six runs and five hits in five innings.

“It was OK. I definitely wasn’t as sharp as I have been, but I had some pretty solid innings and some pretty competitive innings,” Vargas said. “That four-run inning was really the game-changer and that’s what cost us.”

HOME RUN CHAMP BLANKED:

Mets rookie first baseman Pete Alonso, who won Monday’s Home Run Derby contest as part of the All-Star festivities, went 0 for 3 with a walk and tied a season high with three strikeouts. It was only the second time since May 29 Alonso has struck out three times in a game.

TRAINER’S ROOM:

2B Jed Lowrie had a setback in his recovery as he awaits his season debut. “His strength on his left side (with his knee and hamstring) is really good,” general manager Brodie Van Wagenen said. “Unfortunately he’s now battling a lower right calf strain, a low-grade calf strain that he started to feel as his workload was ramped up so we’re going to take care of that and then hopefully progress within a time frame to be able to play in the second half.”

OF Brandon Nimmo (neck) “is doing well,” Van Wagenen said, adding that Nimmo was playing catch and doing more running.

UP NEXT:

RHP Noah Syndergaard (6-4, 4.68 ERA) is 6-1 with a 1.74 ERA in nine career starts against the Marlins.

(© Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)