Jacob deGrom #48 of the New York Mets sits in the dugout (Rich Schultz/Getty Images)

NEW YORK — Christian Yelich showed off his bat, legs and glove, capped by hitting a three-run homer that helped the Miami Marlins beat shaky Jacob deGrom and the New York Mets 6-4 on Thursday night to end their season-worst five-game losing streak.

Yelich homered and singled twice, drove in four runs and stole two bases. He also made a dashing, diving catch in center field with the bases loaded and two outs — that made up for him later dropping a routine fly for an error.

Jose Urena (3-5) outpitched deGrom (7-8) as Miami averted a four-game sweep. Down 6-1, the Mets made it close, boosted by pinch-hitter Asdrubal Cabrera's two-run homer in the ninth off Fernando Rodney.

The Mets fell two games behind idle St. Louis for the second wild-card spot, with the Marlins another game back. Earlier in the day, New York second baseman Neil Walker said he needed season-ending surgery for a herniated disk.

Sign up for the NJ1015.com Newsletter

Get the best of NJ1015.com delivered to your inbox every day.

(Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed)