Washington ended an eight-game skid and snapped Philadelphia's seven-game road winning streak.
The Phillies haven't swept a five-game series since pummeling the Marlins in 2001 at home.
Nats starter Jackson Tetreault (1-1) earned his first major league victory in his second appearance. The 26-year-old right-hander gave up three unearned runs over seven innings, with two walks, six hits and two strikeouts.
''He threw a gem (Sunday),'' Nationals manager Dave Martinez said.
Tetreault was hit on the inside of his lower left shin by a 105.7 mph comebacker by Matt Vierling in the seventh. Athletic trainer Paul Lessard and Martinez checked on Tetreault, who remained in the game after an extended delay. He finished the inning before walking to the dugout with a slight limp.
A black wrap covered his lower shin postgame. The pain did not deter his joy from his first win, which came with his father and family in the stands on Father's Day.
''It's awesome,'' Tetreault said. ''Hopefully many more to come.''
A few baseballs from the outing will go home with his parents.
Soto's first-pitch, three-run homer in the second ran counter to his problems with runners in scoring position this season. He entered Saturday's game with a .476 OPS with men on second or third. Only one of his previous 13 homers was hit with runners in scoring position.
''It's like a flush,'' Soto said of the homer after struggling. ''You flush your mind, your body, everything. You feel amazing. Your work's coming through.''
Maikel Franco's sixth homer of the season put Washington up 8-3 in the fifth. Washington shortstop Luis Garcia was 3 for 4.
''We had a tough week, but we have to just stay positive, keep grinding,'' Franco said.
Phillies starter Zach Eflin (2-5) continued to struggle on the road. He lasted just two innings and 38 pitches, allowing four runs on five hits. He has a 7.27 ERA on the road, compared to 1.95 at home. Eflin was on a 50-pitch limit because of a bruised knee.
''He was doing a lot of running around, covering first, backing up bases,'' Philadelphia manager Rob Thomson said. ''Looked to me like he was a little ginger walking around. So I was just being careful, got him out early.''
Philadelphia is unsure if Eflin will make his next start.
Cesar Hernandez doubled to score Yadiel Hernandez and boost the Nationals' lead to 5-2 in the fourth. Nelson Cruz walked after Philadelphia intentionally walked Josh Bell to load the bases, plating another run in the fourth. Keibert Ruiz flew out to end the inning with the bases loaded.
Bryson Stott's fourth-inning single drove in a run to cut Washington's lead to 4-2.
Ruiz's throwing error on a pickoff attempt to first allowed Kyle Schwarber to score from second and pull Philadelphia within 6-3.
Philadelphia optioned RHP Michael Kelly to Triple-A Lehigh Valley after the game. Washington sent RHP Cory Abbott to Triple-A Rochester postgame.
STRANGE-GORDON MOVING ON
The Nationals requested unconditional release waivers for OF Dee Strange-Gordon on Sunday. Strange-Gordon hit .304 in 59 at-bats for Washington this season but had no walks and only a .356 slugging percentage. He was designated for assignment June 14 and is now free to sign with another team.
Phillies: OF Bryce Harper (blister) was out of the starting lineup for the second consecutive game. Thomson said Harper's blister came from swinging the bat in the cage. Harper may be available Tuesday when the Phillies open a road series against Texas.
''The blister's healed,'' Harper said. ''It's an infection underneath the blister. Kind of wait that out and see how much better it can get the next couple days.''
Asked if he has tried to swing since the infection occurred, Harper said, ''No, there's no way.''
IF Johan Camargo (right knee strain) played Sunday as the designated hitter for Triple-A Lehigh Valley. He could be activated Tuesday.
Phillies: Monday is a day off. RHP Kyle Gibson (4-2, 4.04 ERA) opens a two-game road series against Texas on Tuesday.
Nationals: Monday is a day off. RHP Erick Fedde (4-5, 4.88 ERA) starts a two-game road series in Baltimore on Tuesday.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.