Updated

Mariano Rivera's night began so nicely: A touching tribute and a Citi Field salute from the New York Yankees' crosstown rivals.

As it turned out, the first pitch he threw was a lot more fun than the last.

David Wright and Lucas Duda hit RBI singles off Rivera in the ninth inning, and the New York Mets rallied past the Yankees 2-1 on Tuesday to beat baseball's all-time saves leader only hours after honoring him for his incredible career.

"It has been great, everywhere I've been this year. And tonight everything was great — until the ninth," Rivera said.

Matt Harvey and Hiroki Kuroda locked up in an entertaining pitchers' duel that went to the ninth with the Yankees leading 1-0 on Lyle Overbay's run-scoring single. But all three batters to face Rivera (0-1) got hits, handing him the first blown save of his farewell season after he had converted 18 straight chances.

"Hopefully, it's the last one," Rivera said.

Daniel Murphy opened the ninth with a double just inside the left field line, and Wright tied it with a single to center. Wright reached second on Brett Gardner's throwing error and got a great jump off the bag when Duda fisted a single to right-center.

Wright scored pretty easily and the normally quiet Duda egged his teammates on for a wild celebration that carried into the outfield as Rivera walked slowly toward the dugout. With their second consecutive 2-1 victory over the Yankees, the Mets swept the first two-game leg of the Subway Series and matched a season high with their third straight win.

It was the first time in his 19-year career that Rivera entered with a save opportunity and failed to get an out.

"It did happen quick," he said after throwing only nine pitches.

Rivera blamed himself for not backing up the plate on Wright's single.

"I should be better than that," he said. "It's my fault."

The Yankees have lost three in a row for the first time this year. They were the only team in the majors that hadn't had a three-game skid.

Scott Rice (3-3) tossed a scoreless inning and the Mets took the unbeaten Harvey off the hook for a loss for the third time this year.

"I think we surprised ourselves," Wright said, "because when you get Mo coming in, it's usually game over."

The teams now head to Yankee Stadium for games Wednesday and Thursday night.

Saluted by the Mets and the FDNY before the game, the 43-year-old Rivera, who plans to retire after the season, cracked a big smile as he threw out a ceremonial first pitch to Mets career saves leader John Franco following a 91-minute rain delay at the start.

Just before that, the Mets played a video tribute to Rivera that ended with the message, "Congratulations on a Hall of Fame career."

Earlier, Mets chief operating officer Jeff Wilpon presented Rivera with a mounted fire hose nozzle, and New York City Fire Commissioner Sal Cassano gave the game's greatest closer a mounted call box during a brief ceremony inside the ballpark.

Perhaps it all softened up Rivera for a hard fall as midnight approached.

"Maybe that's what it was," Mets catcher John Buck said. "We squeezed one out of the best in the game — we know that."

Showing no ill effects from his bruised calf, the 38-year-old Kuroda rebounded from a rough outing with a splendid one and demonstrated why he's been the Yankees' most dependable starter the past two seasons. He struck out seven and walked none, allowing only four singles in seven shutout innings.

Kuroda needed to be stingy to stay with the 24-year-old Harvey, who came out firing 96-98 mph fastballs in his Subway Series debut against the team he grew up rooting for in nearby Connecticut.

Harvey fanned 10 and walked none while yielding six hits in eight innings. Former Mets ace Dwight Gooden sat four rows behind home plate, updating Harvey's K count on Twitter, as usual.

The Yankees broke through in the sixth after right fielder Marlon Byrd bobbled Gardner's leadoff single for an error that allowed the speedster to reach second. Gardner advanced on a groundout and scored when Overbay lined a two-out single right past Harvey, who snapped his head in anger.

Moments later, Gardner raced back and extended his arm just in time to catch Murphy's drive to deep left-center. Gardner's right shoulder slammed into the fence but he held onto the ball, denying Murphy a key extra-base hit for the second consecutive night.

In the series opener, Gardner robbed Murphy of a home run with a leaping catch in left-center — also in the sixth inning with a runner on. Murphy got the last laugh, though, with a tiebreaking single in the eighth for a 2-1 Mets win.

NOTES: Steady afternoon showers thinned a crowd of 31,877 that left full sections of seats nearly empty. ... The Yankees said it was the longest they've gone into a season without dropping three games in a row since 1955, according to the Elias Sports Bureau. ... Reid Brignac made his third start at shortstop for the Yankees and turned in a pair of fine defensive plays in the first three innings. ... The second leg of the Subway Series marks the beginning of an eight-game homestand for the Yankees that includes visits from Boston and Cleveland. ... Mets manager Terry Collins was ejected during an animated argument after Ruben Tejada was picked off second base to end the sixth. Second base umpire Adrian Johnson initially signaled safe, then changed his call — correctly, it appeared.