HOUSTON (AP) The Houston Astros walked off to end a wild ninth-inning rally against the Tampa Bay Rays, moving closer to securing a postseason berth.

The party will have to wait one more day at least, with the Seattle Mariners stubbornly sticking around.

Rays reliever JT Chargois walked two Houston batters with the bases loaded in the ninth inning, propelling the Astros to a 4-3 win that snapped a four-game skid.

Houston turned its attention to Seattle, which finished off a 4-2 win over Oakland hours later, leaving the Astros' magic number at one to clinch a fourth AL West title in five years. They can clinch Wednesday with a win over Tampa Bay or a loss by the Mariners.

Manager Dusty Baker said the team kept looking ahead and didn't let the recent slump affect them.

''These guys, they believe that we can win and should win,'' Baker said.

Alex Bregman and Jose Altuve hit solo homers for the Astros as they rallied for the victory.

''We needed this one,'' Altuve said. ''We needed to create some momentum ... to put those games in the past and start winning.''

The Rays took a 3-2 lead when Randy Arozarena hit a solo homer off Phil Maton (5-0) with one out in the ninth.

Yordan Alvarez singled on a grounder off Josh Fleming (10-7) to start Houston's ninth and was replaced by pinch-runner Jose Siri. Carlos Correa then legged out a single on a hard-hit grounder to second baseman Brandon Lowe. He was initially called out, but the Astros challenged the play and it was overturned.

Kyle Tucker grounded out before the Rays intentionally walked Aledmys Diaz to load the bases. Chargois took over and walked Chas McCormick on his 10th pitch to tie it. He then walked pinch-hitter Jason Castro on eight pitches to give the Astros the unconventional walk-off victory.

''I threw some quality pitches ... it didn't work out and I gave it everything I had,'' Chargois said. ''Those guys did an unbelievable job.''

Castro said he knew a little bit about Chargois because he had caught him years ago when the two played for the Twins.

''That was a string of really big at-bats that set up the way it ended,'' Castro said. ''It was great to see that display of continual really good at-bats and approaches.''

It was the first time in franchise history that the Astros drew consecutive walks with the bases loaded to win a game. The last time it happened in the majors was on July 2, 2019 when the Los Angeles Dodgers did it in a victory over Arizona.

Yandy Diaz hit a two-run home run in the first inning to give the Rays an early lead.

The Astros didn't get a hit until Bregman's shot cut the lead to 1 with two outs in the sixth.

There was one out in the eighth when Altuve connected off David Robertson on his 31st homer this season to tie it at 2.

The loss ends a four-game winning streak for the AL East-champion Rays and leaves them a win or a loss by the Astros shy of clinching the best record in the American League.

Houston couldn't get anything going early as Michael Wacha started the game and didn't allow a hit through five innings.

Wacha, who pitched out of the bullpen his last time out, was lifted after 61 pitches. He walked Yuli Gurriel with two outs in the first and Correa to start the second before retiring his last 12 batters.

Andrew Kittredge, who was activated from the injured list before the game, took over for the sixth and sat down the first two batters he faced before Bregman sent the first pitch off the wall in left-center to cut the lead to 1.

Houston starter Jose Urquidy permitted four hits and two runs while striking out six in five innings.

TRAINER'S ROOM

Rays: Diaz was replaced in the bottom of the seventh inning with rib discomfort. Manager Kevin Cash said they'd have more information about his condition Wednesday. ... Kittredge was activated after missing the last 10 days with a neck strain. ... Cash said LHP Adam Conley tested positive for COVID-19 and was placed on the COVID-19 injured list. Cash said he does not have any symptoms, but he'll have to be away from the team for 10 days, so he won't be eligible to return for the start of the ALDS.

Astros: Baker said RHP Zack Greinke (neck soreness) could go on a rehab assignment with Triple-A Sugar Land this week. ... Third base coach Gary Pettis rejoined the team Tuesday after being away since testing positive for COVID-19 on Sept. 17. ... RHP Kendall Graveman was placed on the paternity list Tuesday and RHP Josh James was recalled from Sugar Land to take his spot on the roster.

THEY SAID IT

Wacha on being pulled without allowing a hit: ''I didn't put up much of a complaint. I've never really been that kind of guy.''

UP NEXT

Houston's Luis Garcia (11-7, 3.23 ERA) opposes Drew Rasmussen (3-0, 2.67) when the series continues Wednesday night.

---

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

Copyright 2024 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.