NEW YORK (AP) -- Damion Easley saw an opening and grabbed it.
"We're not going to slug it out every time," Easley said. "It was a struggle for us offensively. I like the way we were able to capitalize on their mistakes."
Easley led off the 14th with a single to left. He advanced to second on a wild pitch with one out and reached third when Hanrahan committed a throwing error trying to pick him off second.
Ryan Church struck out and Hanrahan (0-1) intentionally walked David Wright and Carlos Delgado to load the bases. Hanrahan then bounced the first pitch to pinch-hitter Brian Schneider, and Easley raced home with the winning run.
"I tried to make it a nasty slider on the first pitch," Hanrahan said. "The situation probably didn't call for that."
Six Mets relievers combined to throw seven scoreless innings with Jorge Sosa (2-1) getting six outs to earn the win.
The Nationals wasted an opportunity to go in front in the 11th when former Mets prospect Lastings Milledge grounded into an inning-ending fielder's choice with two runners on. Nick Johnson also popped out with two on to end the 13th.
New York completed its first series sweep of the season and went 6-3 on its first homestand of its final season at Shea.
"Long, ugly game that turned out pretty," manager Willie Randolph said.
Johnson hit a two-run homer for the Nationals, who managed just six hits and have lost 12 of their last 13 games. Washington entered the day last in the NL in batting average and hits.
The punchless Nationals wasted a terrific effort by Long Island native John Lannan, who had a career-high 11 strikeouts in his first start at the Mets' longtime home. He allowed just one run and three hits in six innings.
"I had my curveball and slider working and my fastball was working well," said Lannan, who jokingly estimated he had 465,000 family members at the game. "I kept it down."
Lannan became the first rookie left-hander to record 10 or more strikeouts in a start without a walk since Noah Lowry did it for the Giants against the Mets in San Francisco on Aug. 20, 2004, according to the Elias Sports Bureau.
Lannan had struck out just 16 batters in his previous eight career starts, and never more than four in an outing.
The Mets stayed close behind their own hometown pitcher, Brooklyn-born Nelson Figueroa. The journeyman right-hander struck out seven in seven innings, allowing two runs and three hits.
"Tip your hat off to the kid," Randolph said. "He stepped up for us big at home."
Figueroa, who grew up a Mets fan, earned his first major league win since 2003 last Friday when he beat Milwaukee in a home start.
Lannan handed a 2-1 lead over to the Washington bullpen and the Mets rallied in the eighth. Church reached on second baseman Ronnie Belliard's two-out error and went to second when Luis Ayala walked Wright.
Delgado, who struck out in his first two at-bats, then hit an RBI single off Nationals closer Jon Rauch.
"If you are going to win 2-1 against the Mets, you have to play perfect baseball," manager Manny Acta said, "and we didn't."
New York also had some opportunities to end the game before the 14th. Angel Pagan lined out with two on to end the 10th and Wright grounded into an inning-ending double play with two on in the 12th.
It was the longest game at Shea Stadium since the Mets beat the Phillies 9-8 in 16 innings on May 23, 2006.
New York paid tribute Thursday night to the first team that took the field at Shea.
Former Mets Ron Hunt, Jack Fisher and Tim Harkness were on hand to change the sign in left-center field counting down the number of regular-season games remaining at the club's creaky home. Harkness recorded the Mets' first hit at the stadium, Hunt scored the team's first run and Fisher started New York's 4-3 loss to the Pittsburgh Pirates.
The Mets' new home, Citi Field, already is a prominent part of the skyline beyond the outfield wall at Shea.
Lannan allowed a leadoff single to Jose Reyes in the first and Church followed with an RBI double into left-center field. He settled down after that, retiring 16 straight before Reyes singled again with one out in the sixth.
Lannan nearly got a hit in the fifth but Figueroa reached behind his back to spear the line drive up the middle.
A CT scan on C Paul Lo Duca's bruised right hand came back negative and the Nationals said he was day to day. Lo Duca, who signed with Washington in the offseason, didn't play in the three-game series against his former team. ... Mets CF Carlos Beltran was held out of the starting lineup with a stiff neck. He pinch-hit in the ninth and struck out ... Willie Stargell got the first hit at Shea, a second-inning homer off Fisher. ... Lannan's 11 Ks were the most by a Montreal/Washington rookie since Brian Barnes struck out 11 on June 2, 1991, against the Chicago Cubs.