NEW YORK - The New York Mets scored two runs in the bottom of the ninth inning to beat the Philadelphia Phillies 6-5 and stay in touch with National League East-leading Washington Nationals. Trailing by a run and down to their last out in the bottom of the ninth with the bases loaded, the Mets rallied to win with two runs on consecutive singles. Daniel Murphy tied the game at 5-5 when his shot up the middle deflected off pitcher Jonathan Papelbon, before David Wright sent the home crowd into raptures with a soft hit into right field that landed just out a diving Hunter Pence's reach. The hit capped a great night for Wright, who drove in four runs, including a two-run homer in the bottom of the fifth. “"I had the worst at-bat out of anybody in that inning," Wright told reporters. "I was just going up there looking for something I could just put in play, almost like a two-strike approach up there." The Mets improved to 45-38 and remain hot on the heels of the division-leading Nationals (48-32), who won in almost identical fashion on Thursday, beating San Francisco 6-5 with two runs in the bottom of the ninth. The Phillies dropped to 37-47 in the NL East. The game was feted as a pitching duel between New York's R.A. Dickey and Philadelphia's Cole Hamels but both team's batters stepped up to steal the limelight with the Phillies concocting 13 hits on the night to the Mets's 10. Dickey appeared on course for a first loss since April 18 but his team mates stepped up to restore his 12-1 record. “"When you get an outing from your ace that you're not expecting, and the other guys rise to the occasion and pick him up, that's a huge win for the club," manager Terry Collins said. Philadelphia took charge early with a run in each of their first two innings for a 2-0 lead. Scott Hairston then smacked a season-leading 12th home run for the Mets with a solo blast in the bottom of the second before Wright tied the score at 2-2 when his double brought Dickey home an inning later. The Phillies led again in the fourth when Mike Fontenot, Rollins and Pence all singled to tag another run on the board but they lost the lead for the first time in the bottom of the next when Wright's two-run homer gave the Mets a 4-3 lead. Philadelphia quickly seized back the momentum with two runs in the top of the sixth but their hopes of holding on for the win were dashed with just one more out needed.