PHOENIX (AP) -- Pinch-hitter Kevin Frandsen and Danny Espinosa each hit solo homers in the ninth inning, helping the Washington Nationals rally for a 6-5 win over Arizona Diamondbacks on Monday night in Matt Williams' return to the desert.
Williams was a fixture in Arizona before becoming Washington's manager this offseason.
His new team scored four runs early, shut down for four innings, and tied it when Espinosa hit the second pitch of the ninth by Addison Reed (1-3) just over the wall in right.
Frandsen put the Nationals up by lining his second career pinch-hit homer to left and Rafael Soriano stranded a runner at second in the ninth for his eighth save.
Tyler Clippard (3-2) pitched a scoreless inning, Ian Desmond hit a two-run homer and Tyler Moore added a solo shot for Washington.
A.J. Pollock hit a two-run homer and Aaron Hill had three hits for Arizona.
[RELATED: What happened to the Nationals' offense?]
Williams played for Arizona from 1996-2003 and was on the coaching staff from 2010-13 before getting his first shot at managing. He received a nice ovation when he was recognized and a video tribute played on the video board after the first inning.
Williams' current team limped into the desert for a three-game series against his old one.
The Nationals have lost five of their eight position players from opening day to the disabled list, the latest first baseman Adam LaRoche, who went out Sunday with a strained right quad.
The Diamondbacks have been headed in the opposite direction since getting off to the worst start in franchise history. Ten games under .500 after 18 games, Arizona has started to show signs of life, winning three straight series during a 6-3 road trip that ended on Sunday.
Both teams knocked the ball around the ballpark most of the night.
Moore, LaRoche's replacement, went 0-for-3 after being called up on Sunday, but had a quick impact in Monday's game, hitting a solo homer to left off Josh Collmenter in the second inning to put Washington up 2-0.
Collmenter hit his first career double in the third inning and scored on Martin Prado's ground-rule double to end Jordan Zimmermann's scoreless streak at 12 innings. Paul Goldschmidt followed with another run-scoring double and Miguel Montero drove him in with a single to put Arizona up 3-2.
The lead didn't last long; Desmond lined a two-run homer to left in the fourth to put Washington back up 4-3.
Collmenter allowed four runs on four hits in five innings.
Pollock put Arizona on top again in the sixth inning, dropping a two-run homer onto the pool deck in right.
Zimmermann allowed five runs on 10 hits in 5 2-3 innings.
NOTES: Phoenix Mercury center Brittney Griner threw out the ceremonial first pitch. ... Arizona RHP Brad Ziegler stretched his scoreless streak to 18 1-3 innings with a perfect eighth. ... Arizona RHP Bronson Arroyo, who will start the second game against Washington on Tuesday, is 2-0 and has not allowed an earned run in 14 1-3 innings his past two starts. He will face Stephen Strasburg, who is 2-0 with a 1.37 ERA his past four starts.