WASHINGTON (AP) The offense that Washington Nationals manager Dave Martinez has been waiting for showed up just in time to prevent a sweep at the hands of a division rival Sunday night.

Daniel Murphy's single drove in the tying and go-ahead runs in the eighth inning and the Nationals rallied past the Philadelphia Phillies 8-6 to salvage the finale of the three-game series.

Anthony Rendon homered and doubled, Bryce Harper tied a career high with three doubles and Michael A. Taylor and Murphy each had three singles as Washington pounded out 17 hits in a game that was delayed 38 minutes by rain in the bottom of the fourth inning.

"We weren't scoring very many runs," Martinez said, "and for us to come out and compete like we did today and put up eight runs . and just really work very good at-bats, I felt really good for the boys and I know they'll feed off it."

Pinch hitter Brian Goodwin led off the eighth with a walk. With one out, right-hander Seranthony Dominguez (1-2) came on to face Harper, who doubled to right, with Goodwin stopping at third.

After Rendon grounded out, Phillies manager Gabe Kapler elected to walk rookie Juan Soto and pitch to the veteran Murphy, who began the day hitting .135.

"You pick your poison right there," Kapler said. "You have two very good hitters. The first one in Soto has been elite. And Murphy has struggled a little bit. And we went after the guy that was struggling and coming off injury."

After throwing three 98-mph plus fastballs to get ahead 1-2, Dominguez tried a slider that Murphy lined to shallow right. Taylor's single made it 8-6.

"I was watching some film on him and he had kind of gone with the slider as a kill shot to a couple lefties, so once I got two strikes I was aware of it," Murphy said. "I hadn't seen it yet, so that's never any fun, but fortunately I was able to get it in the air enough and kind of scoop it over Cesar (Hernandez's) head at second base."

The Phillies took a 6-2 lead in the fifth on a two-run triple by Odubel Herrera and a two-run homer by Williams, but the bullpen surrendered six runs.

Washington pulled within a run at 6-5 in the sixth with four two-out hits, including an RBI triple by Trea Turner and RBI doubles by Harper and Rendon.

RENDERFUL

Rendon has hit safely in nine of his last 10 games is batting .447 (17-for-38) in that span with three homers, seven RBIs and nine runs scored.

TRAINER'S ROOM

Phillies: C Andrew Knapp left in the seventh with a right knee contusion. ... 3B Maikel Franco slipped on first base and fell hard in the eighth. He stayed in to run but left after the half-inning with lower back tightness. ... INF Jesmuel Valent�n was placed on the paternity leave list and OF Dylan Cozens (left quadriceps strain) was reinstated from the 10-day DL.

Nationals: RHP Jeremy Hellickson (right hamstring strain) allowed 11 runs in 4 2/3 innings of a rehab start at Class A Potomac on Sunday. "I'm more concerned with the way he feels," manager Dave Martinez said, downplaying the results. "We'll go from there." ... RH reliever Brandon Kintzler (right forearm flexor strain) threw a scoreless inning at Potomac. ... RHP Stephen Strasburg (right shoulder inflammation) played catch on the field again. "We'll keep doing his throwing progression and figure out when he can actually throw from the mound," Martinez said.

UP NEXT

Phillies: RHP Vince Velasquez (5-7, 4.82) starts the opener of a series against the Yankees on Monday. He is 0-0 with a 3.24 ERA in two games vs. New York.

Nationals: RHP Gio Gonzalez (6-4, 3.08) opens a series at Tampa Bay on Monday. He is 2-2 with a 5.54 ERA in six games against the Rays.