Diekman walked Denard Span to open the 10th inning. With one out, Jayson Werth hit a fielder's choice grounder to Chase Utley at second, but his flip to shortstop Jimmy Rollins for the force was wide.
Utley took a gamble in attempting to get the runner at second.
"I tried to get it to him quickly and it obviously didn't work out in our favor," Utley said.
Diekman struck out Adam LaRoche for the second out, but Ryan Zimmerman made it 4-3 with an RBI single to center. Werth scored the fifth run on a wild pitch.
After the inning, Diekman was ejected by home plate umpire Andy Fletcher. The pitcher said he used no profanity when talking to the umpire.
"I asked him were any of those close," Diekman said. "He said with a smirk on his face, 'Were what close?' I said those four or five pitches, and that was it. I was told I was kicked out of the game."
Werth did plenty of damage against his former teammates. He had an RBI groundout in the first inning and a two-run homer to right in the sixth off Cole Hamels.
Werth entered the game 3 for 22 (.136) with a home run and four RBIs and six strikeouts against the Phillies lefthander.
Meanwhile, Washington righthander Stephen Strasburg never found his rhythm despite striking out nine. He did not survive the sixth inning, when the Phillies scored twice.
Rollins opened the inning with an infield hit off the glove of diving first baseman LaRoche. Utley singled to right, putting runners on first and second. After Ryan Howard flew out to left, Rollins and Utley executed a double steal.
Marlon Byrd then hit a one-out, 2-RBI single to left and took second base on the throw home. Following a Cody Asche strikeout, Strasburg walked Cameron Rupp.
That finished Strasburg's evening. He threw 111 pitches in 52/3 innings. Lefty Jerry Blevins retired Ben Revere on a fly to left.
In the seventh inning, Domonic Brown, who was not in the starting lineup because he was ill, opened with a pinch single off Drew Storen. Brown left the game for pinch-runner Tony Gwynn Jr., who eventually reached third but was left stranded when Utley popped out to left to end the inning.
Revere tied the game at 3 in the eighth on an RBI single off Tyler Clippard after Asche singled and Rupp walked with two outs. Before Revere's hit, the Phillies had been 1 for 12 with runners in scoring position. Pinch-hitter Cesar Hernandez struck out to end the inning.
"I was just trying to find a good pitch to hit," Revere said. "I was trying to do anything to tie the game."
Hamels didn't earn a decision, but he continued an impressive streak against the Eastern Division rivals.
Hamels lasted seven innings, allowing three runs (all earned) while striking out five and walking three. He threw 117 pitches.
That meant that Hamels has now allowed three earned runs or fewer in each of his last 11 starts against the Nationals.