Updated

David Robertson got right to the point after giving up the go-ahead run in the eighth inning Monday night.

"I did a terrible job. I didn't have command of anything tonight. I kept getting behind in the count, I couldn't throw any first-pitch strikes," Robertson said. "It was really tough, frustrating."

Robertson gave up Daniel Murphy's RBI single in the eighth after Brett Gardner denied him a homer two innings earlier, and the New York Mets rallied to beat the rival Yankees 2-1 for their second straight home win after losing eight in a row.

David Wright hit his first home run at Citi Field this year, off Phil Hughes, to tie it in the seventh. Murphy came through against Robertson (3-1) to hand the Yankees their first loss in 23 games when leading after six innings.

Robertson pitched in relief of Hughes, who worked seven sharp innings, giving up four hits without walking a batter.

But Mike Baxter doubled with one out in the eighth, pinch-hitter Jordany Valdespin walked and they moved up on Chris Stewart's passed ball.

With the infield playing in, Ruben Tejada hit a grounder to second baseman Robinson Cano, who snapped a throw home. Stewart made a sweep tag on Baxter's back as he tried to reach his hand out to touch the plate. With two outs, Murphy followed with a single.

"That ball got by me," Stewart said, "Unfortunately it took us out of a double play."

Murphy's drive to left-center in the sixth was caught above the wall by Gardner to end the inning. Hughes was there to slap Gardner five when he ran into the dugout.

"I was just ecstatic that I got away with a mistake," Hughes said. "It's the best catch I've ever been on the mound for, by far."

Brandon Lyon (2-2) pitched a scoreless eighth in relief of an impressive Jonathon Niese.

Bobby Parnell worked the ninth for his eighth save.

With the Mets entering at 11 games under .500 and the Yankees playing without several of their injured All-Stars, the Subway Series seemed to have lost much of its luster. There were plenty of empty seats throughout Citi Field and the 32,911 fans were awfully quiet for a game between these clubs.

That could change come Tuesday night, when the Mets send young ace Matt Harvey to the mound against the Yankees' most consistent starter, Hiroki Kuroda, in the second of four straight games between the teams.

"We have Harv going tomorrow, it provides us some momentum," Wright said. "If we're going to climb our way back into the thing and start heading towards .500 we're going to have to win these close games. ... Hopefully we can ride this momentum into tomorrow with Matt's start."

Niese and Hughes showed they could be pretty good, too. Both pitchers are having inconsistent seasons but they worked quickly into the sixth inning, with the game scoreless.

The Yankees took the lead in the sixth when left fielder Lucas Duda came up short on a diving attempt at Gardner's opposite-field liner. The ball scooted past Duda and Gardner raced into third base with a triple. Jayson Nix followed with a single that dropped just in front of a charging Baxter in right for a 1-0 lead.

Gardner got off to a tough start Monday in the oddly angled center field. He took his eye off Wright's drive to check for the section of the wall in front of the Mets' bullpen that is a chain-link fence, and it went for a first-inning triple.

There was no looking back the next time.

With Niese on first after his second single of the night, Murphy sent a fly that Gardner tracked to the wall. He jumped in front of the 385-foot marker and caught the ball above the fence.

"I didn't think it was hit as good as it showed," Gardner said. "I didn't realize it was going out."

Niese got Gardner to ground out with runners on second and third to end a threat in the seventh.

Wright fell behind 0-2 leading off the seventh before hitting a full-count pitch into the left-center stands for his seventh homer.

"I tried to keep him off balance early in the at-bat. Then I tried to go in since I had success earlier with that pitch against him," Hughes said. "I went in, it just got too much of the plate."

Niese allowed eight hits and one run in seven innings. Hughes pitched seven, too, yielding one run and four hits. He struck out six and walked none.

NOTES: Wright has two homers against Hughes in 12 at-bats. ... Yankees reliever Joba Chamberlain (right oblique strain) said he should be activated from the DL on Tuesday. ... Yankees LHP Francisco Rondon, designated for assignment on Friday, has been sent outright to Double-A Trenton. ... The Mets will honor Yankees closer Mariano Rivera before Tuesday's game.