PHILADELPHIA — Kyle Kendrick outpitched All-Star Jordan Zimmermann, pinch-hitter Kevin Frandsen hit a tiebreaking double in the seventh and the Philadelphia Phillies beat the Washington Nationals 3-1 Thursday night.

Kendrick (8-6) allowed one run and five hits in seven innings to help Philadelphia take three of four from the defending NL East champions.

The Phillies are 7-3 since July 2, including series wins over first-place Pittsburgh and Atlanta, to pull within 1½ games of the second-place Nationals and one game of .500.

Zimmermann (12-4) gave up two runs and eight hits, striking out six in 6 1-3 innings.

Antonio Bastardo pitched a perfect eighth and Jonathan Papelbon finished for his 20th save in 24 tries. Papelbon blew two saves against the Nationals last month and allowed two runs in a 3-2 win Monday night.

Darin Ruf led off the bottom of the seventh with a double down the left-field line. Pinch-runner John McDonald advanced on a sacrifice and scored on Frandsen's RBI double off center fielder Denard Span's glove.

Frandsen is hitting .355 (11 for 31) with 10 RBIs as a pinch-hitter this season.

Kendrick overcame a season-high four errors by the Phillies with two double plays and nine groundouts. Chase Utley had a career-worst three errors.

Utley got the Phillies an insurance run in the eighth by hitting a double to start the inning, moving to third on a fly ball and sliding in safely just ahead of a throw to the plate on Michael Young's grounder to second.

The Phillies took a 1-0 lead on Ben Revere's RBI single in the fifth. Carlos Ruiz reached on an infield single, advanced on Kendrick's sacrifice and scored on Revere's liner to left-center.

The lead didn't last long.

Bryce Harper hit a triple with one out in the sixth and scored on Ryan Zimmerman's sacrifice fly to right.

All-Star Domonic Brown threw out fellow All-Star Harper trying to score from second on Jayson Werth's two-out single to left in the first. That was Washington's first hit with runners in scoring position in the series after going 0 for 16.

NOTES: David Bell was the last Phillies player to have three errors in a game on May 17, 2005. ... The Phillies lead with the majors with 37 pinch hits. ... The Phillies, who had a streak of 257 consecutive sellouts from July 7, 2009 to Aug. 6, 2012, drew 40,086 fans to fall short of a sellout on Fireworks Night at Citizens Bank Park. ... Werth was 2 for 4 and is batting .328 (40 for 122) with six doubles, six homers and 21 RBIs since returning from the DL on June 4. ... Washington is 5-35 when scoring less than three runs. ... Jonathan Pettibone (5-3, 3.84) faces John Danks (2-6, 4.31) when the Phillies open an interleague series against the Chicago White Sox on Friday night. ... Stephen Strasburg (5-6, 2.45) pitches for the Nationals vs. Miami's Nathan Eovaldi (1-0, 2.55) Friday night.