SEATTLE (CBSDFW.COM/AP) — Marwin Gonzalez hit two of Houston’s four home runs, and the Astros knocked the Seattle Mariners from the lead for the second wild card in the American League with an 8-3 win on Wednesday.

After a five-game losing streak, the Astros rebounded to win the final two games of the series. Houston has a five-game cushion over Seattle in the AL West and dropped the Mariners into a tie with surging Oakland for the second AL wild-card spot. Oakland beat Toronto on Wednesday to pull even.

Seattle led the A’s by 11 games in the middle of June, but has seen the entire lead disappear over the past six weeks.

Gonzalez hit a solo home run off Wade LeBlanc (6-2) with two outs in the second inning and added a two-run shot in the fourth.

gettyimages 1009161380 e1533169646613 Astros Launch 4 Homers, Beat Mariners With Springer, Altuve And Correa Out Of Lineup

Marwin Gonzalez #9 of the Houston Astros hits his second solo home run of the day against the Seattle Mariners in the fourth inning at Safeco Field on August 1, 2018 in Seattle, Washington. (Photo by Lindsey Wasson/Getty Images)

Jake Marisnick, recalled from the minors before the game, added a two-run shot off LeBlanc and Max Stassi greeted reliever Nick Vincent with a three-run homer in the fifth to break the game open.

Gonzalez had the third multihomer game of his career after not hitting a longball since June 27 against Toronto.

LeBlanc’s outing was his worst of the season as he was unable to locate his off-speed pitches down in the strike zone. The seven earned runs were the second-most allowed in his career as a starter and the three homers matched a career high. LeBlanc lost for the second time in his past four starts after winning his first five decisions of the season.

Dallas Keuchel (9-9) improved to 6-1 in his past nine starts, throwing seven innings, allowing three runs and striking out two. He retired 11 straight at one point and 11 of the 21 outs he recorded came via the groundball.

gettyimages 1009161482 Astros Launch 4 Homers, Beat Mariners With Springer, Altuve And Correa Out Of Lineup

Dallas Keuchel #60 of the Houston Astros pitches in the second inning against the Seattle Mariners at Safeco Field on August 1, 2018 in Seattle, Washington. (Photo by Lindsey Wasson/Getty Images)

The bottom of Seattle’s lineup pieced together four consecutive hits in the second, capped by RBI singles from Andrew Romine and Zach Vincej. But Seattle’s offense continued to lag and was otherwise limited to Nelson Cruz’s solo home run in the sixth, his 26th of the season.

The Astros are currently in first place in the American League West division with a 69-41 record.

ROSTER SHUFFLE

Astros: Houston optioned OF Kyle Tucker to Triple-A Fresno to clear a roster spot for Marisnick. Marisnick was optioned to Fresno on July 13.

Mariners: Seattle optioned OF Ben Gamel and RHP Chasen Bradford to clear roster spots for the addition of Cameron Maybin and new reliever Adam Warren. Manager Scott Servais said while Gamel has been a better hitter, the decision was to keep Guillermo Heredia as the Mariners’ fourth outfielder because he provides more versatility. Servais said to expect more of a platoon in left field in the coming weeks between Heredia and Denard Span to take advantage of left-right matchups on the mound.

TRAINER’S ROOM

Astros: OF George Springer was out of the lineup a day after leaving the game with a sore shoulder. He’s listed as day-to-day.

Mariners: 1B Ryon Healy was scratched because of lower back tightness shortly before first pitch. … 3B Kyle Seager is expected to return from paternity leave and rejoin the club on Thursday.

UP NEXT

Astros: After an off day, the Astros will open a three-game series in Los Angeles in a World Series rematch with the Dodgers. Justin Verlander (10-6) will start the opener.

Mariners: Felix Hernandez (8-9) makes perhaps his most important start of the year in the opener of a four-game series with Toronto. Hernandez lasted just 2 2/3 innings and was rocked for seven runs in his last start against the Angels, prompting questions about whether he would stay in the rotation. If he has another bad outing, watch for a possible change.

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)