DETROIT  — Neil Walker hit a tiebreaking two-run homer in the top of the ninth, and the New York Mets avoided a sweep with a 3-1 victory over the Detroit Tigers on Sunday.

The Mets were victimized by some bad luck when the Tigers tied it with back-to-back infield singles in the seventh, but after escaping the eighth thanks to a Detroit baserunning blunder, New York retook the lead when Walker went deep off Francisco Rodriguez (1-2).

Anibal Sanchez pitched eight impressive innings for the Tigers, and Jacob deGrom was strong for the Mets in the finale of this three-game series. Addison Reed (3-2) got the win in relief, and Jeurys Familia pitched the ninth for his major league-leading 39th save in 41 chances.

Michael Conforto homered for the Mets in the seventh.

Sign up for the Newsletter

Get the best of delivered to your inbox every day.

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