Troy Taormina-USA TODAY Sports

Yordan Alvarez homered and drove in three runs as the host Houston Astros held on for a 7-5 victory over the New York Yankees on Thursday night to complete a sweep of a day-night doubleheader.

Alvarez was activated from the injured list before the doubleheader after a brief absence due to an injured right hand. He did not start the opener but was intentionally walked as a pinch hitter in the ninth inning when the Astros opened the third doubleheader in the history of their current ballpark with a 3-2 victory.

In the nightcap, Alvarez hit his 27th home run three batters in against New York's Domingo German (0-1) and added a two-run double.

Alex Bregman also homered and hit an RBI single as the Astros won five of seven meetings in the season series with the Yankees. Houston never trailed in any of the games until allowing game-ending hits to Aaron Judge on June 23 and 26 in New York.

On Thursday, Chas McCormick contributed a two-run homer as Houston improved to 25-9 in its past 34 contests.

Gleyber Torres hit a two-run homer and Judge hit a three-run shot in the ninth, but the Yankees lost for the seventh time in 10 games and dropped their fourth straight road contest.

Houston's Luis Garcia (8-5) beat the Yankees for the second time this season, allowing two runs on three hits in five innings. Garcia struck out six and walked two.

Brandon Bielak followed Garcia with 3 1/3 innings. The Astros tried to get Bielak through four innings, but he was lifted after Judge hit his major-league-leading 34th homer -- a shot that traveled well over the left-field seats.

Rafael Montero got Matt Carpenter to hit into a game-ending double play and converted his seventh save in eight opportunities.

German returned from a right shoulder injury and allowed five runs on six hits in three innings in his season debut.

In the first inning, Alvarez made it 1-0 when he homered into the Crawford boxes in left, and Bregman lifted an 0-2 sinker into those seats to double the score. Alvarez's two-run double off the middle of the fence in left-center made it 4-0 in the second and Bregman followed by singling to center field for a five-run lead.

Torres homered into the left-field seats in the third, but McCormick connected off J.P. Sears in the sixth for a 7-2 lead.

More must-reads:

TODAY'S BEST
Celtics stars don't have to be at their best for team to win NBA title
Luka Doncic needs more help than supporting cast can give him against deep Celtics
Watch: Carlos Alcaraz makes history with first French Open title
Kyle Larson wins strategical dogfight at chaotic Sonoma 
Watch: Mets mount wild rally, turn incredible double play to stun Phillies
Chiefs WR Rashee Rice: 'I’ve learned so much'
Scottie Scheffler collects his fifth win of 2024 at Memorial
Former Sharks player 'deep in the process' of becoming team's head coach
How the Lakers can protect their future and please LeBron James
Wrigley Field match breaks the NWSL attendance record
Ryan Garcia arrested on vandalism charge
NFL teams that could go from first to worst in 2024
Max Verstappen flexes dominance, wins Canadian Grand Prix
Watch: Jrue Holiday keeps Celtics afloat during first half of Game 2
Report: Veteran TE to re-sign with Bears
Watch: Liberty's Jonquel Jones scores season-high 29 points in win vs. Mystics
Report: Phillies showing trade interest in Diamondbacks outfielder
Caitlin Clark reveals thoughts about not being on Olympic team
Giants tight end announces decision on NFL future
WWE preparing for potential loss of elite high-flyer