WASHINGTON -- Jayson Werth made a career milestone memorable by denying his former manager one of his own.
Werth got three hits against his former team, including an RBI single in the fourth and his two-out, tiebreaking shot off reliever Zach Miner.
"When you set out playing this game, however many years ago, that was one thing, a benchmark you put on the list of things you want to accomplish," said Werth, unaware of the landmark hit until after his previous at-bat. "It was good."
In his second major league game, Tanner Roark (1-0) pitched two spotless innings. Tyler Clippard surrendered Domonic Brown's 26th home run in the eighth and Rafael Soriano pitched the ninth for his 29th save.
In 58 games since returning from a hamstring injury on June 2, Werth is hitting .355 with 13 homers and 38 RBI.
"He's absolutely raking right now," Bryce Harper said. "I'm just trying to touch his bat so I can get some hits in there."
Jake Diekman (0-3) took the loss.
Darin Ruf also homered for the Phillies, who wasted an early 4-0 lead in dropping their 10th straight road game.
"When you start losing and you find different ways to lose every night it becomes tough," Phillies manager Charlie Manuel said. "You've got to fight through it."
The Nationals' rally denied Manuel the 1,000th win of his career. Philadelphia has lost eight of 10 overall.
Phillies starter Cliff Lee left after six innings with a 4-3 edge.
Pinch-hitter Steve Lombardozzi drew a leadoff walk from Diekman in the seventh. With one out and runners at the corners, Diekman faced Harper in a lefty vs. lefty matchup.
Nationals manager Davey Johnson called for a safety squeeze on the first pitch, which Harper took for a ball. Given the swing sign on Diekman's next offering, the All-Star outfielder whiffed badly.
"So I was like, `You know, maybe you should just lay one down,'" Harper said.
His bunt popped in the air and landed in front of second baseman Chase Utley, who recorded a forceout at second as the tying run scored.
Werth, who then greeted Miner with his homer down the left field line, aptly graded the slugger's bunt.
"S" for surprising," Werth said. "It worked out."
Anthony Rendon tacked on a two-run single later in the inning.
After leaving Philadelphia before the 2011 campaign for a hefty contract in Washington, Werth struggled with the bat during his first season and battled to stay healthy in the second.
After his home run, the crowd of 32,676 roared for a curtain call. The NL Player of the Month for July, who heard boos in previous seasons, obliged.
"Anytime you gain respect from the fans, from the city, that's definitely a good thing," Werth said. "I know that first season was tough for everybody, more so for myself than anybody. Then last year with the injury.
"It's been a tough road, but I'm excited about the future here in Washington and I'm glad the city and the fans can see what I'm all about."
Lee had lost his previous three starts. The veteran left-hander has not won since defeating Atlanta on July 5.
"I feel like when I'm out my job's done. It's up to the guys coming in behind me to keep it where it's at," said Lee, who later added that he had confidence in the Phillies pen.
Lee picked up an RBI with a safety-squeeze bunt during Philadelphia's four-run second inning. Ruf hit a two-run homer off Taylor Jordan and later Jimmy Rollins singled home a run.
On his 26th birthday, Wilson Ramos hit a two-out single in the sixth to score Werth, trimming Philadelphia's lead to 4-3. Werth scored three times.
Making his eighth career start, Jordan allowed four runs and seven hits over five innings. ... Facing minor league batters, Phillies RHP Roy Halladay threw five 15-pitch innings during a simulated game in Clearwater, Fla. "He came out of it great," Phillies pitching coach Rich Dubee said. Halladay has been on the disabled list since May 6 and eventually had right shoulder surgery. ... Sunday's series finale matches RHP Kyle Kendrick (10-8, 4.36 ERA) against Nationals RHP Stephen Strasburg (5-9, 3.01 ERA).