ATLANTA — Max Scherzer won for the first time in two months, Juan Soto homered and the Washington Nationals beat the Atlanta Braves 9-4 Sunday to stop the NL East leaders' nine-game winning streak, their longest in five years.

Yan Gomes homered twice, and Adam Eaton and Asdrúbal Cabrera each had three RBIs to help Washington end a four-game skid. The Nationals are nine games back of the Braves with three weeks left but began the day with a two-game lead for the top NL wild card.

Scherzer (10-5) had not gotten a decision in four starts since beating Kansas City on July 6, a span that included nearly a month on the injured list because of a bad back.

The three-time Cy Young Award winner won his eighth straight decision, allowing one run and two hits in six innings with nine strikeouts and two walks. He stranded a pair of runners in scoring position in the fourth by striking out Tyler Flowers.

Scherzer has a 1.71 ERA in 14 starts since a May 17 loss to the Chicago Cubs. His 2.56 season ERA is second in the NL to Hyun-Jin Ryu's 2.45. Atlanta's Mike Soroka is third at 2.67.

Soroka (11-4) gave up four runs and seven hits in six innings. Atlanta had won its previous 13 home games.

RELATED: Atlanta Braves bringing competitive skiing, snowboarding to SunTrust Park

Washington, which outhit the Braves 17-7, went ahead when Eaton hit a two-run homer on Siroka's fifth pitch. Gomes homered in the second and Matt Joyce went deep in the bottom half, but Soto made it 4-1 in the third with his 33rd homer, an opposite-field drive to left.

Cabrera, who had four hits, had a two-run double in the seventh as Washington opened an 8-1 lead.

Charlie Culberson homered in the Braves' three-run ninth, stopping an 0-for-26 slide.

RELATED: Atlanta Braves handed out more than 7,000 free tickets to Hurricane Dorian evacuees