NEW YORK — Dellin Betances, Didi Gregorius and the rest of the diminished New York Yankees hardly resembled a team resigned to quietly fading away this summer.

Starlin Castro hit a sacrifice fly in the 10th inning and the Yankees, after selling off stars at the trade deadline, showed plenty of spunk while rallying past the Mets 6-5 on Monday night in their Subway Series opener.

"Just tells you that the guys we have in here don't give up," starter CC Sabathia said. "It's going to be tough ... but we have the guys in here to battle and try to get back in this thing."

Gregorius hit a tying single with two outs in the eighth and Betances worked out of a major jam for his first save this season. Hours after trading slugger Carlos Beltran and pitcher Ivan Nova before the non-waiver deadline, the Yankees (53-52) snapped a four-game slide and won for the seventh time in the past nine meetings with their crosstown rivals.

"It's been a tough week for us. We've lost some unbelievable guys in our clubhouse," Betances said. "Been an up-and-down year. So it was nice to get a victory."

Wilmer Flores and rookie Matt Reynolds homered for the skidding Mets, who lost their fifth in six games as fans in the sellout crowd of 42,125 traded chants throughout the night following a hectic afternoon at Citi Field.

Earlier in the day, the defending NL champions completed deals to land All-Star outfielder Jay Bruce and reacquire left-hander Jon Niese.

"We got ourselves where we wanted to be," manager Terry Collins said after his team tried to rally against Betances. "We just couldn't finish it off."

Jacoby Ellsbury drew a four-pitch walk from rookie Seth Lugo (0-1) leading off the 10th and went to second on Mark Teixeira's single. A fired-up Ellsbury beat Lugo's throw to third on pinch-hitter Ben Gamel's sacrifice, loading the bases.

Gregorius struck out, but Ellsbury scored easily when Castro hit a long fly to the right-centre warning track.

"I thought the effort was great," Yankees manager Joe Girardi said.

Betances, the new closer after the Yankees jettisoned predecessors Aroldis Chapman and Andrew Miller within the past week, came through in his first save chance since those deals — but not without some tense moments and a visit from Girardi.

James Loney hit a leadoff double and the Mets had runners at the corners when Rene Rivera hit a comebacker for the second out. With two men in scoring position, Betances struck out Curtis Granderson on three pitches for his 11th career save.

"It was fun," Betances said. "Obviously, not a 1-2-3 inning. But I got out of it."

Adam Warren (1-0) worked two hitless innings in his first win for the Yankees since they reacquired him from the Chicago Cubs in the Chapman trade.

Playing again without ailing slugger Yoenis Cespedes, the Mets took a 5-3 lead in the sixth when Reynolds — just recalled from the minors — connected for a three-run homer off Sabathia.

Gregorius fought back from an 0-2 count and tied it at 5 with a soft, two-run single off setup man Addison Reed after his costly wild pitch.

Reed had not allowed a run since June 25, a career-best streak that lasted more than 16 innings. During that stretch, he struck out 26 and gave up only seven hits.

"He made a good pitch," Collins said. "It's one of those things where they hit it where nobody was standing. But we'll regroup."

The third-place Mets dropped to 2-6 on their nine-game homestand and lost for the ninth time in their last 11 at Citi Field.

OFF AND RUNNING

The Subway Series got off to a bang when speedy Brett Gardner hit the second pitch to the centre-field fence 408 feet away and tried for an inside-the-park home run after the ball caromed away from Mets centre fielder Justin Ruggiano. Granderson, alertly backing up, started a 9-4-2 relay that cut down Gardner at the plate as he attempted to score with a headfirst slide.

MATZ BATS

With the banged-up Mets short on the bench, pitcher Steven Matz was sent up as a pinch-hitter in the sixth. He walked on a full count, ending Sabathia's night.

ROSTER MOVES

To replace Beltran and Nova on the roster, the Yankees recalled Gamel and RHP Nick Goody from Triple-A Scranton/Wilkes-Barre. Goody retired No. 3 hitter Neil Walker on a shallow fly with the bases loaded to end the sixth, keeping the Yankees within two runs. ... Yankees general manager Brian Cashman said C Gary Sanchez, a touted prospect, is likely to be called up from the minors as soon as Wednesday. ... RHP Tyler Clippard, who pitched for the Mets in the World Series last season, made his first appearance for the Yankees since they reacquired him Sunday from Arizona. Clippard struck out two in a scoreless seventh.

TRAINER'S ROOM

Mets: Cespedes (thigh) might be able to pinch-hit Tuesday, Collins said. ... Ruggiano exited in the fourth with a mild strain of his left hamstring, the team said. Alejandro De Aza moved from left field to centre, and Michael Conforto entered in left. Conforto had an RBI double in the fifth against Sabathia, a rare hit off a left-hander. ... Reynolds started at shortstop after Asdrubal Cabrera sustained a strained patellar tendon in his left knee Sunday against Colorado. "He's going to get some playing time as we wait for Cabby to get better," Collins said. ... RHP Zack Wheeler (Tommy John surgery) threw a simulated game in Florida.

UP NEXT

Yankees RHP Masahiro Tanaka (7-3, 3.16 ERA) starts Tuesday night at Citi Field against Jacob deGrom (6-5, 2.56), who is 0-2 with a 5.25 ERA in two career starts vs. the Bronx Bombers. He lost 1-0 to the Yankees in his major league debut at Citi Field on May 15, 2014. Tanaka is 1-1 with a 1.20 ERA in two starts against the Mets, both at Citi Field.