PHOENIX -- Kevin Frandsen's pinch-hit home run with two outs in the top of the ninth inning capped a two-run inning and lifted the Washington Nationals to a 6-5 victory over the Arizona Diamondbacks on Matt Williams' return to Chase Field on Monday.

Frandsen hit a 2-0 pitch from closer Addison Reed (1-3) for his first homer of the season after second baseman Danny Espinosa opened the inning with his sixth homer. Reed has given up six homers in 19 2/3 innings this season.

First baseman Tyler Moore and shortstop Ian Desmond also homered for Washington (20-18), which broke a three-game losing streak.

Nationals center fielder Denard Span had three hits and scored a run.

Center fielder A.J. Pollock hit a two-run home run to give Arizona a 5-4 lead with one out in the sixth inning off Nationals starter Jordan Zimmermann.

Tyler Clippard (3-2) pitched a 1-2-3 eighth inning for the victory, and Rafael Soriano gave up two hits in the ninth before recording his eighth save.

Second baseman Aaron Hill had three hits for Arizona (15-26), which had won two in a row and four of its last five.

Williams spent the final six seasons of his major league career with Arizona and served as third-base coach from 2011-13 before being hired as Washington's manager in the offseason.

Span tripled to open the game and scored on a sacrifice fly by third baseman Anthony Rendon before Moore homered in the second inning for a 2-0 Washington lead.

Arizona starter Josh Collmenter doubled down the right-field line, his first hit of the season, to start a three-run rally in the third inning, giving Arizona a 3-2 lead. Third baseman Martin Prado and first baseman Paul Goldschmidt had RBI doubles to tie the game, and catcher Miguel Montero singled in the final run of the inning. All the runs scored with two outs.

Desmond's two-run homer after catcher Wilson Ramos walked made it 4-3 for the Nationals.

NOTES: Washington RF Bryce Harper (left thumb ligament) had the stitches removed from his hand Monday, manager Matt Williams said, but there is no timetable for when he will begin rehab. ... Williams returned to Arizona for the first time after spending the previous three seasons as the Diamondbacks' third-base coach on manager Kirk Gibson's staff. The Diamondbacks showed highlights of Williams' six seasons in Arizona on the center-field video board between the first and second innings. Williams acknowledged the ovation with a wave of his hand. ... Arizona RF Gerardo Parra snapped a streak of 34 plate appearances without a strikeout when he fanned in the third inning. ... Nationals RHP Jordan Zimmermann speared a line drive from RF Gerardo Parra and fell down as he made the catch for the final out of the fourth inning with a runner on third base.