WASHINGTON -- Starting pitcher Cole Hamels continued his mastery of Washington and batterymate Carlos Ruiz hit a three-run double as the Philadelphia Phillies won 5-4 on Saturday, ending a seven-game winning streak by the defending National League East champions.
The Nationals scored three runs in the seventh inning to pull within 5-4, but reliever Jake Diekman got Denard Span (three hits) on a comebacker to the mound to end the eighth with pinch runner Jeff Kobernus on second.
Phillies closer Jonathan Papelbon allowed a leadoff double to Ryan Zimmerman in the ninth then retired Jayson Werth and Ian Desmond on fly balls before giving an intentional walk to Bryce Harper. Wilson Ramos then hit a hard one-hopper to shortstop Jimmy Rollins for the final out.
Washington (78-70) fell 5 1/2 games behind the Cincinnati Reds for the second wild card spot in the National League.
The Phillies are 15-3 in Hamels' last 18 starts against Washington; the lefty is 11-3 in those starts. Philadelphia (69-79) has won Hamels' last seven starts.
Hamels (8-13) pitched six innings and gave up three earned runs, taken out with the bases loaded and no outs in the seventh.
Justin De Fratus came on for Hamels and got Werth on a fielder's choice as Scott Hairston was retired at the plate. Desmond then hit a sacrifice fly to center to pull Washington to within 5-2.
Lefty Cesar Jimenez came out of the Philadelphia bullpen to face Harper, who hit a bloop single to center to score Zimmerman. Werth also scored as the ball got past center fielder Cesar Hernandez to make it 5-4.
The Phillies turned to reliever B.J. Rosenberg, who fanned Ramos as he looked at a third strike that appeared to be inside for the final out.
Washington starter Gio Gonzalez (10-7) struggled with his location and gave up nine hits and four earned runs before he was lifted after six innings for rookie Ian Krol.
The Phillies scored three runs in the fifth and made it 5-1 on an RBI single by Chase Utley in the seventh. The Nationals hit 15 homers in their previous five games but did not have any extra-base hits against Hamels.
John Mayberry of the Phillies tied the game 1-1 in the fifth as he lined a one-out solo homer into the Philadelphia bullpen in left field for his 11th home run.
It was the first run allowed in 13 innings by Gonzalez, who threw a one-hit shutout on Monday against the New York Mets.
Philadelphia loaded the bases later in the fifth and Ruiz came through with a three-run double to right field to clear the bases and give the Phillies a 4-1 lead. That gave Ruiz 14 hits in his last 24 at-bats with runners in scoring position, with 19 RBI.
Washington's Denard Span led off the first with a single to center to extend his hitting streak to a career-high 25 games. He then stole second, took third on a wild pitch and scored on a sacrifice fly by Werth to give Washington a 1-0 lead.
NOTES: Wilson Ramos, who was on the disabled list earlier in the year, made his 22nd start in a row at catcher for Washington. "I am happy to be back. I am working very hard. I want to go to the playoffs," said Ramos, who was injured last season when the Nationals made their drive to the NL East title. ... Zimmerman had throwing problems early in the year, but his defense has been strong of late, and Harper threw out two runners at second in Friday's game. "It is still a very good fielding team. I love our defense," said Washington manager Davey Johnson. ... The Phillies entered Saturday with a road record of 27-45, the sixth-worst mark in the majors. ... Tyler Cloyd (2-4, 4.56) will get the start for Philadelphia in the series finale Sunday. He gave up nine hits and seven runs in 4-plus innings in his last start, on Tuesday against the San Diego Padres. Jordan Zimmermann (17-8, 3.36) will pitch for Washington.