Jorge Alfaro hit a two-run homer and drove in three runs to help the Miami Marlins end a seven-game losing streak with an 8-6 win against the visiting New York Mets on Friday night.Garrett Cooper had two hits and drove in his first two runs of the season to end a 26-inning scoreless streak for Miami. Brian Anderson had two hits and scored twice for the Marlins, who also ended a seven-game losing streak against the Mets dating to last season.Trevor Richards (1-5) went 6 1/3 innings for Miami, allowing three runs and six hits. He struck out four and walked three.Mets starter Jacob deGrom (3-5) couldn’t deliver a fourth straight quality start and was lifted after five innings. He gave up seven runs (six earned) and nine hits, struck out three and walked none.Pete Alonso hit two home runs, J.D. Davis also homered, and Brandon Nimmo, Wilson Ramos, Juan Lagares and Todd Frazier had two hits each for New York, which has lost three straight.After Alonso gave the Mets a 1-0 lead with an opposite-field homer in the second inning, Cooper singled on the 10th pitch of his at-bat in the third to give the Marlins a 2-1 lead.The Marlins added two more runs in the fourth on RBI singles by Alfaro and Miguel Rojas. Anderson made it 5-1 with a run-scoring double in the fifth before Alfaro clubbed his two-run homer to extend the lead to 7-1.Davis entered the game in left field when deGrom came out and he belted a two-run homer in the seventh to cut the lead to 7-3.Anderson doubled to lead off the seventh and later came home on a sacrifice fly by Starlin Castro to make it 8-3.Alonso led off the eighth with his second home run of the game and 14th of his rookie season. The next four batters also reached base safely, but Sergio Romo came out of the bullpen and limited the Mets to two additional runs, allowing the Marlins to maintain an 8-6 lead.Romo also pitched the ninth for his seventh save.