Dinelson Lamet struck out a career-high 14 and Kirby Yates fanned pinch-hitter Ryan Braun with a runner on second base to close out the San Diego Padres' 2-1 win over the playoff-contending Milwaukee Brewers on Wednesday night.

The Brewers, who had won four in a row, began the day tied with the Cubs for the second NL wild-card spot.

Rookie Seth Mejias-Brean hit his first career home run as the Padres ended a six-game losing streak.

San Diego Padres' Seth Mejias-Brean hits a two-run home run during the third inning of a baseball game against the Milwaukee Brewers Wednesday, Sept. 18, 2019, in Milwaukee. (AP PhotoMorry Gash)

San Diego Padres' Seth Mejias-Brean hits a two-run home run during the third inning of a baseball game against the Milwaukee Brewers Wednesday, Sept. 18, 2019, in Milwaukee. (AP PhotoMorry Gash)

Yates took over took to begin the ninth and walked Eric Thames to start the inning. With one out, pinch-runner Tyrone Taylor strayed too far off first base on a popup to shallow left and nearly got doubled off, but was hit in the back by Mejias-Brean's throw. Taylor went to second on the shortstop's throwing error, and was stranded when Yates struck out Braun for his 41st save.

The Brewers appeared to score the tying run on a fluke play with two outs in the seventh inning, but it was not allowed. With Cory Spangenberg on third base, Trent Grisham swung and missed at a third strike that wasn't caught cleanly. Grisham was called safe when first baseman Eric Hosmer dropped the throw from catcher Francisco Mejia, with Spangenberg crossing the plate.

But after a brief discussion among the umpires, it was ruled Grisham had kicked the ball, apparently inadvertently, on his way to first and that made it a dead ball and a strikeout.

Milwaukee Brewers starting pitcher Adrian Houser is looked at by a trainer during the third inning of a baseball game against the San Diego Padres Wednesday, Sept. 18, 2019, in Milwaukee. (AP PhotoMorry Gash)

Milwaukee Brewers starting pitcher Adrian Houser is looked at by a trainer during the third inning of a baseball game against the San Diego Padres Wednesday, Sept. 18, 2019, in Milwaukee. (AP PhotoMorry Gash)

Lamet (3-5), who missed the entire 2018 season after undergoing Tommy John surgery, repeatedly hit 97 mph. He struck out five of the first six Milwaukee batters — three of them on three pitches each. Lamet pitched six innings, giving up three hits.

After giving up his first hit of the game, a single in the third inning to Greg Garcia, Brewers starter Adrian Houser (6-7) reached for his back and the game was stopped while he stretched and was examined by the team trainer. He remained in the game.

The next batter, Mejias-Brean, in his 11th career at-bat, hit his first career home run. The drive, on an 0-2 pitch, hit the top of the wall in right-center field and gave San Diego a 2-0 lead.

Milwaukee Brewers' Mike Moustakas flips his bat after striking out during the third inning of a baseball game against the San Diego Padres Wednesday, Sept. 18, 2019, in Milwaukee. (AP PhotoMorry Gash)

Milwaukee Brewers' Mike Moustakas flips his bat after striking out during the third inning of a baseball game against the San Diego Padres Wednesday, Sept. 18, 2019, in Milwaukee. (AP PhotoMorry Gash)

Keston Hiura connected off Lamet in the sixth for his 17th home run of the season.

UP NEXT

The teams finish their four-game set with Padres LHP Joey Lucchesi (10-8, 4.22 ERA) facing Brewers RHP Jordan Lyles (11-8, 4.25 ERA). Lucchesi gave up eight runs in 3 ? innings in his last start. Lyles gave up one earned run in each of his last two starts, over 10 ? innings.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports