WASHINGTON (AP) — Trea Turner hit two homers, including his first career grand slam, and drove in eight runs to help the Washington Nationals rally from a nine-run deficit and defeat the Miami Marlins 14-12 in a wild slugfest Thursday night to end a five-game losing streak.

The Nationals, who dropped 17 of their previous 22, have won 12 consecutive games against Miami dating to last season — their longest winning streak against any team since the franchise moved to Washington in 2005.

The victory came a day after the Nationals called a players-only meeting Wednesday after Washington was swept by Boston and slipped under .500 for the first time since May 2. Turner's eight RBIs tied for the most ever by a leadoff hitter, according to STATS LLC.

Shawn Kelley (1-0) pitched a scoreless sixth for the win. Sean Doolittle earned his 22nd save in 23 opportunities.

Adam Conley (2-1) allowed five runs in 2/3 of an inning and took the loss.

RANGERS 7, TIGERS 5

DETROIT — Joey Gallo and Ronald Guzman homered as Texas beat Detroit.

Yovani Gallardo (3-0) got the win, giving up four runs and eight hits in 5 1/3 innings. He walked one and struck out two while winning his third straight start.

Keone Kela allowed a run in the ninth before finishing off his 21st save as Texas snapped a three-game losing streak.

Matthew Boyd allowed a season-high seven runs and seven hits in four innings. He is 0-3 with a 10.59 ERA in his last four starts.

Detroit lost is third straight and dropped to 2-14 since June 17.

TWINS 5, ORIOLES 2

MINNEAPOLIS — Aaron Slegers got his first major league win by finishing six smooth innings in his first start of the season for Minnesota, and the Twins stopped their six-game losing streak by hanging on to beat Baltimore.

Logan Morrison homered and Jake Cave reached base all four times he batted for the Twins, who turned to Fernando Rodney for the ninth for his 18th save following two consecutive blown chances.

Jonathan Schoop hit two home runs, but the Orioles squandered another quality start by Andrew Cashner (2-9) and lost for the 10th time in 11 games. They have the worst record in the major leagues at 24-62, just the team the Twins needed to face to start a season-long 11-game homestand after a 1-8 road trip.

BREWERS 7, BRAVES 2

MILWAUKEE — Jhoulys Chacin threw seven solid innings and Hernan Perez homered among his three hits, leading Milwaukee to a 7-2 victory over Atlanta in a matchup of first-place teams.

The NL Central Division-leading Brewers won their fourth game in a row to go 17 games over .500 (52-35) for the first time since July 1, 2014, when they were 51-34.

Chacin (7-3) gave up three hits and two earned runs while matching a season high with seven strikeouts in what tied for his longest outing this year. The right-hander was 0-2 in his previous three starts while allowing 10 runs in 15 2/3 innings.

Dan Jennings pitched two perfect innings for his first save this season, and second of his career.

NL East-leading Atlanta dropped its third consecutive game after winning four straight. Braves left-hander Max Fried (1-3) lasted only three innings in his third start of the season, giving up four earned runs and four hits with three walks.

ASTROS 4, WHITE SOX 3

HOUSTON —Jose Altuve hit a two-run homer in the fifth inning and Yuli Gurriel's RBI single with one out in Houston's two-run ninth lifted the Astros to a win over Chicago.

The Astros trailed by 1 when Joakim Soria (0-3) walked pinch-hitter Tony Kemp with no outs in the ninth before advancing to third on a single by pinch-hitter Marwin Gonzalez. George Springer snapped an 0-for-8 slump and tied it at 3-3 with his RBI single to shallow center field.

Alex Bregman walked to load the bases and Altuve struck out before Gurriel sent a ball over second baseman Yoan Moncada's head into right field to give Houston the victory.

Justin Verlander bounced back from his last start where he allowed nine hits and five runs — both season highs — in a loss to Tampa Bay with a solid outing. He yielded four hits and two runs and struck out 10 in seven innings.

Joe Smith (3-1) allowed one hit in a scoreless ninth for the win in his first appearance since June 6.

CARDINALS 11, GIANTS 2

SAN FRANCISCO (AP) — Luke Weaver pitched two-hit ball over eight innings and the St. Louis Cardinals beat the Giants.

Jedd Gyorko had three hits, including a homer, and drove in five runs to spoil the return of Johnny Cueto after two months on the disabled list. Matt Carpenter and Harrison Bader also went deep, while Yadier Molina singled three times.

The Cardinals had a season-high 18 hits — their most since getting 19 against the New York Mets on Aug. 24, 2016.

Alen Hanson homered for San Francisco, which has scored five runs while losing four straight.

Weaver (5-7) faced two over the minimum and had seven strikeouts. He carried a perfect game into the sixth before giving up a single and Hanson's two-run homer. Weaver then bounced back to retire the final seven batters he faced.

Cueto (3-1) was rocked in his long-awaited return from the 60-day disabled list. He gave up four runs in the first inning — one more than he had in 32 innings before going out with right elbow inflammation.

PADRES 6, DIAMONDBACKS 3

PHOENIX (AP) — Eric Lauer limited Arizona to a run over five innings, Austin Hedges homered for the first time since April 10 and the San Diego Padres opened a four-game series in the desert with a victory over the slumping Diamondbacks.

Lauer (4-5) gave up seven hits, walked two and hit a batter, but only one of those baserunners managed to score in his first win in four starts. Brad Hand gave up an infield single, then struck out the next three in the ninth for his 24th save.

The Diamondbacks fell to 1-6 in what will be a 10-game homestand and dropped into a virtual tie with the idle Los Angeles Dodgers for first place in the NL West. Arizona had been alone in first since June 8.

Shelby Miller (0-3) was better in his third start coming off Tommy John surgery, but still got the loss, allowing five runs — three earned — and five hits in 5 1/3 innings.

Arizona's Ketel Marte hit a two-run homer off Matt Strahm in the eighth.

MARINERS 4, ANGELS 1

SEATTLE (AP) — Chris Herrmann hit his first home run for Seattle and Marco Gonzales pitched six solid innings to lead the Mariners past the Los Angeles Angels.

Gonzales (9-5) gave up five hits while striking out seven in a 102-pitch outing. The lone run he gave up was Kole Calhoun's sacrifice fly in the fourth inning to tie the game at 1. Edwin Diaz struck out the side in the ninth to lock up his major league-leading 34th save.

The Mariners have not lost a home series since May 6, when they dropped two of three games to the Angels. They are 6-0-3 during that span.

Angels starter Jaime Barria (5-5) allowed two runs and five hits in 5 1/3 innings in the loss.

___

More AP baseball: https://apnews.com/tag/MLBbaseball