MIAMI (AP) Brad Hand was solid for the Miami Marlins in his first start in nearly two months.

Hand tossed four scoreless innings and left with a lead before the New York Mets came back to win 5-1 on Tuesday night.

''Very pleased with the effort we got from Brad Hand,'' Marlins manager Dan Jennings said. ''Brad, to step up and start when he's been coming out of the bullpen and to give us that effort that he did. He had traffic pretty much in every inning, but he navigated his way through it and he made pitches when he needed to. That was huge.''

More from FoxSports

Hand threw 84 pitches and was up 1-0 when he left.

''I threw like 41 pitches through the first four outs,'' Hand said. ''That's never good when you have a short pitch count. I was able to battle and get through four.''

Eric Campbell's tiebreaking pinch single and Juan Lagares' two-run triple highlighted a four-run eighth inning that helped send the Mets to their fifth straight win.

''Our offense is pretty exciting,'' Mets pitcher Jonathan Niese said. ''At any given time during the game they can explode. It's a great feeling.''

Niese (6-9) allowed one run and four hits in seven innings for the NL East-leading Mets.

''There's no sense of panic. There's no sense of urgency,'' Mets manager Terry Collins said. ''We hit the ball good early. They felt like they were going to get some chances to score, and the veteran leadership in the dugout, they were just going to continue to plug away and we did.''

Relievers Tyler Clippard and Jeurys Familia combined to pitch two scoreless innings to end the game.

Lucas Duda drove a ball over right fielder Cole Gillespie for a single leading off the eighth against Mike Dunn (1-5) and Travis d'Arnaud followed with a base hit. Campbell, a .181 hitter batting for Niese, poked a soft line drive into shallow left field over the outstretched glove of shortstop Adeiny Hechavarria.

''I thought I either hit well enough or not well enough where it would drop in there,'' Campbell said.

Lagares, batting in the 9 hole, tripled to make it 4-1 and scored on Curtis Granderson's double.

''I think it was a huge hit for (Lagares),'' Collins said. ''I know he's down a little bit because he's not playing, and I understand it. I totally get it and as we all know there's one way to get back in the lineup, and that's do what he did tonight.''

The Marlins have lost six of seven.

''We had some chances'' Jennings said. ''Again, little frustrating to see a close game. These are the type of games we're going to have to win and when it slips away it's frustrating. (The Mets) right now, they're on a playoff run. They have a lot of momentum going their way. But when you stay right there cheek-to-cheek with them and let it get away it's definitely frustrating.''

Dee Gordon's RBI single in the third ended Niese's scoreless inning streak at 18.

''(Niese) has been very, very good and again tonight,'' Collins said. ''An outstanding outing.''

Ruben Tejada singled off Adam Conley to drive in Wilmer Flores, who scored from second by beating Gillespie's throw as he slid his left hand underneath catcher J.T. Realmuto's tag.

''I was telling him where to slide, he better have scored,'' Niese said. ''It was good. It was a heck of a slide. He hustled all the way through and it was a great hit by Ruben as well.''

TRAINER'S ROOM

Mets: 3B David Wright (back) participated in a workout before he begins a rehab assignment with Class A St. Lucie. ''He hit today, he ran, threw, caught grounders, absolutely looked great,'' Collins said. ''Really looked good. He hit some balls hard.'' ... Collins plans on meeting with RHP Rafael Montero (rotator cuff inflammation) on Thursday in Port St. Lucie, Florida, to give him a motivational speech about his recovery and try to get him back to the big league club as quickly as possible.

UP NEXT

Mets: RHP Matt Harvey (9-7, 2.91 ERA) is coming off a strong outing against Washington on July 31 as he allowed one run in 7 2-3 innings. Harvey is 3-3 with a 1.86 ERA in his last eight starts.

Marlins: RHP David Phelps (4-7, 3.93) is looking for his first win since June 16 against the New York Yankees. Phelps will be making his fourth start against the Mets this season. He has not figured into a decision and has a 2.70 ERA in his first three outings.