NEW YORK — Aroldis Chapman had flamed out, throwing three of 19 pitches for strikes and enabling the Mets to cut a four-run, ninth-inning deficit in half.

Chasen Shreve to the rescue. Yes, Chasen Shreve.

Maligned last month, Shreve entered with the bases loaded, got Devin Mesoraco to hit into a run-scoring, double-play grounder and retired Wilmer Flores on a slow roller in front of the mound . With his second big league save and first since August 2016, Shreve preserved a 7-6 Subway Series victory Saturday that enabled Sonny Gray to win consecutive starts for the first time since the Yankees acquired him last summer.

"He didn't even break a sweat out there," Aaron Judge marveled.

On another tumult-filled day for the last-place Mets, closer Jeurys Familia was traded to Oakland for a pair of minor leaguers and slugging outfielder Yoenis Cespedes was out of the lineup because of body soreness, one game after returning from a two-month absence. Cespedes said Friday night he may need surgery on both heels that would require an eight-to-10-month recovery.

Judge homered for the Yankees , who trailed after Michael Conforto's second-inning solo home run but rallied against Steven Matz (4-8) with a four-run fourth that included Didi Gregorius' tying triple, run-scoring doubles by Miguel Andujar (aided by fan interference ) and Greg Bird, and Austin Romine's RBI single.

Mets centre fielder Matt den Dekker took a bad route as he missed a diving backhand grab on Gregorius' liner that bounced to the fence, allowed Bird's drive to glance off his glove as he tried for a running grab on the warning track, and had Romine's blooper short hop off his glove during an attempted diving catch.

"It's tough when those balls are hit that hard, and you know the wind was moving around out there," said den Dekker, who struck out three times and is hitless in 17 at-bats this season.

Gray (7-7) is 11-14 in 30 starts since the Yankees acquired him from Oakland last July 31. He allowed three runs — two earned — three hits and three walks in 5 1/3 innings.

"I think it's just about now creating that consistent momentum where he's finding success start to start and then kind of building on that, and hopefully that's something that will continue to snowball for him," manager Aaron Boone said.

Gray has a 7.62 ERA in nine home starts this year and a 3.62 ERA in 10 road appearances.

"For me there was only one way to go, and that's up. I guess it couldn't get any worse," Gray said, adding the key was to stop dwelling on previous batters.

Grey left with a 4-1 lead but David Robertson gave up Amed Rosario's RBI single in the sixth, then allowed another run in when he made an errant pickoff throw to first .

Bird chased Matz with an RBI single in the bottom half, Judge hit his 26th homer — and 18th at home — through a blustery wind in the seventh against Tim Peterson, and Romine added a run-scoring grounder in the eighth .

Pitching for the first time in a week, Chapman reached 98 mph just twice — reigniting questions over the health of his left knee. He walked Kevin Plawecki on a full count, gave up an infield hit to Rosario and consecutive four-pitch walks to pitch-hitter Ty Kelly and Jose Reyes . Chapman hit Brandon Nimmo with a 2-0 pitch — his 11th straight ball, and Boone summoned Shreve, who had thrown 18 pitches in Friday's 7-5 loss.

"Not a lot to think about. It's just a bad day overall," Chapman said through a translator.

Mesoraco grounded a splitter to second baseman Brandon Drury , who stepped on the bag and threw to first as Kelly scored. Flores fouled off a 2-2 slider, then grounded out on a splitter.

"I don't know if I had time to have my adrenaline kick in," Shreve said. "It was over like that," he added, snapping fingers.

He had allowed runs in four of five appearances in mid-June, giving up three home runs. That caused him to change pitch selection.

"Just not being so splitter reliant, throwing my fastball more, using my slider some," he said.

Matz lost his third straight start, giving up five runs and nine hits in five-plus innings.

"Stuff just wasn't sharp," he said. "Everything was up."

WELCOME TO THE SHOW

Domingo Acevedo was recalled from Trenton by the Yankees, then was returned to Double-A after the game. A 24-year-old right-hander, Acevedo is 6-6 with a 3.25 ERA in 23 starts. He was watching Netflix in his hotel room and at first thought something was wrong when manager Jay Bell and pitching coach Tim Norton knocked on his door at about 11 p.m. Friday in Binghamton. Acevedo called his mom, in the Dominican Republic, and she also thought something was amiss given the late hour.

TOSSED

Mets hitting coach Pat Roessler was ejected in the third inning by plate umpire Larry Vanover for arguing from the dugout after a called third strike to Reyes, and DH Asdrubal Cabrera was tossed by third base umpire Hunter Wendelstedt after throwing his bat when called out on a checked swing with runners at the corners for the third out of the fifth, then from the dugout threw a batting glove.

OUCH

Nimmo was hit twice, setting a Mets record with 15 this season, one more than Lucas Duda in 2015.

TRAINER'S ROOM

Mets: OF Tim Tebow was placed on the disabled list at Double-A Binghamton with a right hand injury.

Yankees: 2B Gleyber Torres, out since straining his right hip on July 4, began an injury rehabilitation assignment with Class A Tampa and is to rejoin the Yankees on Wednesday at Tampa Bay. Torres went 1 for 3 with a single and a walk. He scored a run and played seven innings on defence.

UP NEXT

RHP Jacob deGrom (5-4, 1.68), who has the lowest ERA in the major leagues, starts for the Mets and RHP Masahiro Tanaka (7-2, 4.54) for the Yankees.

___

More AP baseball: https://apnews.com/tag/MLBbaseball