HOUSTON (AP)Yordan Alvarez and Alex Bregman homered and combined for five RBIs as the Houston Astros completed a doubleheader sweep of the New York Yankees on Thursday with a 7-5 win in Game 2.

Chas McCormick added a two-run home run for the Astros, who won the season series 5-2 against the team with baseball’s best record.

Rookie J.J. Matijevic’s pinch-hit RBI single with two outs in the ninth inning lifted the Astros to a 3-2 win in the opener of the day-night doubleheader between the American League’s top teams.

Aaron Judge hit his MLB-leading 34th homer on a three-run shot off Brandon Bielak to the train tracks atop left field to cut the lead to 7-5 with one out in the ninth in Game 2.

Houston starter Luis Garcia (8-5) yielded three hits and two runs in five innings for his fifth straight win after losing his previous four decisions. Rafael Montero closed out the nightcap with his seventh save.

Domingo German (0-1) took the loss.

In the opener, Bregman had two hits and drove in a run for Houston. Hector Neris (3-3) got the win after allowing Isiah Kiner-Falefa’s tying RBI single in the top half of the ninth.

Cristian Javier tied a season high by issuing four walks while allowing one run and two hits in five innings. It was Javier’s first start against the Yankees since he pitched seven innings in a combined no-hitter at New York on June 25. Neris and Ryan Pressly finished the historic gem.

DJ LeMahieu hit a solo homer in the fifth, but the Yankees were just 1 for 8 with runners in scoring position. Michael King (6-3) got the loss.

DODGERS 9, GIANTS 6

LOS ANGELES (AP) – Mookie Betts broke an eighth-inning tie with a three-run homer and Los Angeles beat San Francisco after blowing a five-run lead in the seventh.

Freddie Freeman homered for his NL-leading 115th hit in the first and the NL West leaders won their fifth in a row and 12th in 13 tries.

Betts also made a spectacular diving catch on Joc Pederson’s liner in the right-field corner for the final out.

San Francisco tied it on a grand slam by Darin Ruf in the seventh, then went ahead 6-5 in the eighth.

Trayce Thompson’s RBI triple off Dominic Leone (3-2) tied it 6-all with two outs in the bottom half. Cody Bellinger drew a walk from left-hander Jarlin Garcia to set up Betts, whose 406-foot shot landed in the left-field pavilion.

Evan Phillips (4-3) worked one inning for the win, and Craig Kimbrel got three outs for his 16th save.

ATHLETICS 5, TIGERS 0, GAME 2

TIGERS 7, ATHLETICS 2, GAME 1

OAKLAND, Calif. (AP) – Sean Murphy hit a three-run homer to highlight Oakland’s five-run sixth inning that broke up a scoreless game, and the Athletics split a doubleheader against Detroit.

In the first game, Jeimer Candelario homered and Robbie Grossman doubled twice and drove in three runs against his former team, leading Detroit.

Murphy connected for his 10th homer – his second straight season in double digits – off Garrett Hill (1-2), a rookie making his third major league start.

Stephen Vogt added a sacrifice fly and Tony Kemp an RBI single in the fifth for the A’s.

Frankie Montas started and went three innings before Domingo Acevedo (2-2) worked the sixth for the win, the sixth shutout of the season for the A’s.

In the opener, Candelario connected leading off the seventh to help back Tarik Skubal (7-8), who struck out nine and didn’t allow an earned run over six impressive innings while pitching back home in the East Bay.

Seth Brown went deep for Oakland, and Stephen Piscotty had a sacrifice fly. Zach Logue (3-5) allowed three runs, two earned, and five hits in six innings.

RANGERS 8, MARLINS 0

MIAMI (AP) – Jon Gray pitched six innings of four-hit ball, Adolis Garcia homered and the Rangers stopped a four-game slide.

Garcia drove in three runs. Marcus Semien had two hits for Texas and reached base four times.

The Marlins lost their fourth straight, and their scoreless streak reached 34 innings. They last scored in the second inning of their 2-1 loss against Philadelphia on July 15.

Gray (7-4) struck out five and walked two.

Miami starter Pablo Lopez (6-5) was charged with five runs and five hits in five innings.

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports