As the Subway Series began at Citi Field Monday night, the Mets and Yankees were on decidedly different tracks.

It was the win-now Mets vs. the rebuilding Yankees.

Who would’ve thunk it?

In a game that started about three hours after both teams made big deals before the non-waiver trade deadline, the Yankees scored two in the eighth to tie it and one in the 10th to beat the Mets, 6-5, before a sellout crowd of 42,125.

Starlin Castro drove in the go-ahead run with a sacrifice fly off Seth Lugo in the 10th.

Dellin Betances, the Yankees’ new closer, worked around a James Loney leadoff double in the 10th to earn the save. He struck out Curtis Granderson for the final out.

The Mets had a two-run lead going into the eighth, but the Yankees tied it when Didi Gregorius floated a two-out, two-run single to left off Addison Reed, who had not allowed a run since June 25.

The Mets had taken a 5-3 lead in the sixth on Matt Reynolds’ three-run homer off CC Sabathia. Reynolds was called up earlier in the day to fill in for shortstop Asdrubal Cabrera, who is headed to the disabled list with a knee injury.

The Mets, who are coming off a World Series appearance and desperately want to get back, shored up their struggling offense before the 4 p.m. deadline with the pickup of slugger Jay Bruce from the Reds for two prospects, including prized second baseman Dilson Herrera.

Bruce joins a crowded outfield — at least on the corners. The Mets will have to figure out what to do with centerfield when Bruce arrives Tuesday.

“We haven’t actually had a lot of time to talk about how exactly the playing time is going to break down,” general manager Sandy Alderson said. “As people I’m sure will comment, it’s not an absolute perfect fit for us. We start with the need for offense and work from there.”

The Mets also re-acquired old friend Jon Niese from Pittsburgh for Antonio Bastardo. Niese will report to the bullpen.

The Yankees continued their selloff by trading Carlos Beltran to Texas and Ivan Nova to Pittsburgh. They joined Aroldis Chapman and Andrew Miller as players general manager Brian Cashman moved for what he hopes are prospect buds that will one day flower into the next Yankees dynasty.

But not today. Instead of a championship banner, the Yankees are raising the white flag.

“There’s no shame,” Cashman said. “We’ve been contending for a long, long time and we are damn proud of that . . . It turned out to be us on the selling side.”

The result of the whirlwind of deadline-day activity was a Subway Series game that seemed like an afterthought. At least until the first batter of the game tried for an inside-the-park home run.

Brett Gardner hit a ball to right-center that banged off the wall. It was an easy triple, but he kept running and was cut down at the plate on a relay throw from Neil Walker to Travis d’Arnaud, who was relieved to have not been traded to Milwaukee.

The Mets, with a makeshift lineup that didn’t include the injured Cabrera or Yoenis Cespedes, took a 1-0 lead when cleanup hitter Wilmer Flores led off the second with a homer to left.

The Yankees tied it in the fourth when Jacoby Ellsbury doubled and scored three batters later on a wild pitch by Logan Verrett.

The Yankees took a 3-1 lead in the fifth on an RBI double by Gardner and RBI single by Jacoby Ellsbury, both with two outs.

The Mets pulled to within a run in the fifth on Michael Conforto’s two-out RBI double into the rightfield corner. Rob Refsnyder, who got the first post-Beltran start in right, missed the ball after a full-out dive.