PHOENIX -- Jayson Werth hit a tie-breaking three-run home run in the fifth inning and Stephen Strasburg ended the season on a high note as the Washington Nationals stopped the Arizona Diamondbacks 8-3 on Friday.
Werth's homer, his 25th of the season, capped a four-run fifth inning off Arizona left-hander Patrick Corbin (14-8) and gave the Nationals a 5-2 lead.
Strasburg (8-9) gave up two runs and six hits in seven innings and retired the last seven batters he faced. He struck out four and benefited from two double plays while lowering his ERA to 3.00.
Wilson Ramos hit a three-run homer in the eighth inning for the Nationals (85-75), who were eliminated from National League wild-card contention earlier in the week in St. Louis. Ramos has a career-high 16 homers, one more than he hit last year.
Gerardo Parra had two hits and an RBI for the Diamondbacks (80-80), who have scored eight runs while losing four of their last five games. The D-backs have never been under .500 this season.
Corbin, who began the season 9-0 and did not have a loss until July, has given up 32 earned runs in 36 innings in his final seven starts. His ERA , 2.35 at the All-Star break, is now a season-high, 3.41.
Arizona's Paul Goldschmidt, who leads the league with 36 homers and 124 RBIs, extended his hitting streak to 17 games with a single in the fifth inning.
A.J. Pollock added two hits for the D-backs and Matt Davidson had an RBI double in a two-run ninth inning.
Strasburg walked Didi Gregorius and hit Corbin before Adam Eaton singled to load the bases in the third inning. Parra singled in one run before Goldschmidt grounded into a double play for a 2-0 Arizona lead.
Bryce Harper doubled off the center-field fence in the fourth inning to drive in Werth, who had walked, to make the score 2-1.
The Nationals tied the score in the fifth when Tyler Moore and Anthony Rendon doubled. They went ahead 5-2 when Werth hit a three-run homer off the facing of the second deck in left field.
NOTES: The Nationals will start either LHP Gio Gonzalez or RHP Tanner Roark on Sunday, manager Davey Johnson said. Johnson has a 1,370-1,070 career record as a manager and told some players he would like to finish 300 above .500. He is retiring after the three-game series ends. "Gio knows it. If we win a couple, he'll go home. If we go 1-1, he'll take the ball. It's kind of complicated and stupid," Johnson said. A few minutes later, Johnson said Roark "probably" would start. ... Goldschmidt and Baltimore 1B Chris Davis are the only major leaguers with at least 36 doubles and 36 homers this season. Goldschmidt has 36 of each. Davis has 53 doubles and 42 doubles. ... Nationals RHP Dan Haren (9-14) will attempt to extend his streak of double-digit victory seasons to nine in his final start of the season on Saturday. He has won at least 10 games every year since 2004, when he became a full-time starter in Oakland.