WASHINGTON (AP) -- Eric Thames hit a go-ahead, two-run homer in the 14th inning, and the Milwaukee Brewers finally held on for a wild 15-14 victory over the Washington Nationals on Saturday.
Christian Yelich hit two home runs, tying for the major league lead with 41, and the Brewers equaled their franchise record with seven. Thames' blast off Javy Guerra (1-1) was the last of them in a 5-hour, 40-minute marathon between National League playoff contenders that featured 38 hits, 17 pitching changes, 11 home runs and blown saves by both teams' closers.
Yelich went 5 for 6 with four RBIs, breaking out of a 1-for-16 slump since returning from a back injury that cost him four games.
Milwaukee earned its seventh victory in 10 games while setting a season high in runs. The loss ended Washington's five-game winning streak.
Junior Guerra (7-4) pitched 1 2/3 innings, but nearly squandered a two-run lead. Keston Hiura's two-out throwing error allowed a run to score and extended the game, but two batters later Guerra struck out pinch-hitter Joe Ross to end it.
Staked to an 11-8 lead, Washington closer Sean Doolittle yielded Yelich's homer to open the ninth. After Hiura's double, Mike Moustakas and Ryan Braun went deep on consecutive pitches to give the Brewers the lead.
It didn't last. Josh Hader entered and gave up a walk, a double and Victor Robles' game-tying single. But after an intentional walk to load the bases, Hader struck out the top third of Washington's order to preserve a 12-12 tie.
Yelich homered again in the 13th to give Milwaukee a 13-12 lead, but again the Nationals came back to prolong it with a walk, a single and Robles' sacrifice fly.
Milwaukee scored five runs in the third off Anibal Sanchez as seven consecutive batters reached safely. Sanchez lasted only four innings, his shortest outing since May 16.
The Nationals rallied to tie it on Juan Soto's two-run homer in the third and Adam Eaton's three-run blast in the fourth. Both came off Brewers starter Jordan Lyles, who also departed after four innings.
Braun and Trent Grisham homered in consecutive innings off Nationals reliever Matt Grace to make it 8-5. Trea Turner and Howie Kendrick homered in the sixth and seventh, respectively, as Washington took an 11-8 lead.