NEW YORK (AP) Michael Cuddyer hit a tiebreaking single in the seventh inning and the NL East-leading New York Mets stopped their five-game home skid, averting a sweep by beating the Boston Red Sox 5-4 Sunday.

Cuddyer kept up his three-week surge since coming off the disabled list, going 3 for 3 with a walk. His go-ahead hit came after Daniel Murphy stole second base with two outs.

Boston slugger David Ortiz lined his 494th home run, moving past Lou Gehrig and Fred McGriff for 27th place on the career list.

More from FoxSports

The last-place Red Sox were denied their first road sweep of the season. They won the first two at Citi Field, games started by Mets aces Matt Harvey and Jacob deGrom.

Tyler Clippard (2-0) got four outs for the win. Jeurys Familia worked around two singles to begin the ninth, striking out Mookie Betts with runners at the corners to close out his 35th save in 40 chances.

Before the game, the Mets completed their trade to get reliever Addison Reed from Arizona. The Mets hope Reed can fill the seventh-inning role and give their tired bullpen a break.

Robbie Ross Jr. (0-2) walked David Wright with one out in the seventh and Murphy grounded into a force play. Heath Hembree relieved and, after Murphy stole on the first pitch, Cuddyer singled through the left side.

Boston scored twice in the seventh to tie it at 4. Pinch-hitter Jackie Bradley Jr. hit an RBI double with two outs that finished starter Noah Syndergaard. Hansel Robles relieved and, after Bradley stole third without a throw, Betts wound up with an odd, tying triple.

Betts hit a high fly that fell down the left field line far in front of Cuddyer as Wright and shortstop Ruben Tejada gave chase. Betts saw no one covering third, and easily beat Wright to the bag.

Juan Uribe had a two-run double and scored on Anthony Recker's single in the sixth, giving the Mets a 4-2 lead.

Ortiz hit a two-run shot in the sixth that put Boston ahead 3-2. Syndergaard singled home Cuddyer in the second against Wade Miley.

TRAINER'S ROOM

Red Sox: Interim manager Torey Lovullo said there's a ''strong possibility'' Hanley Ramirez will play first base later this season. The infielder-turned-outfielder has been working out at the new position, but is currently nursing a sore shoulder. ... 2B Dustin Pedroia (hamstring) will see a doctor in Boston on Monday as he progresses. ... C Ryan Hanigan, scratched Saturday with a calf problem, didn't start.

Mets: Wright returned to the lineup after getting a day of rest. He recently came back after spending more than four months on the disabled list, and the Mets don't want to overwork him.

CLOSING TIME

Red Sox RHP Junichi Tazawa will move back into the eighth-inning role and Jean Machi will be the closer, Lovullo said. Tazawa had been closing since Koji Uehara sustained a season-ending wrist injury, but struggled in that spot. ''Takes time to get used to that last inning,'' Lovullo said.

UP NEXT

Red Sox: LHP Eduardo Rodriguez (7-5, 4.39 ERA) pitches the opener of a three-game series against the Yankees at Fenway Park. He's 1-1 against New York this season.

Mets: RHP Bartolo Colon (11-11, 4.65) starts the opener of a three-game set vs. the Phillies. He pitched seven shutout innings at Philadelphia last week. On Saturday, the 42-year-old made his first relief appearance since 2011, throwing one inning to spare the Mets' bullpen.