And with one swing the Mariners’ losing streak ended, mercifully, at eight games.

Kyle Seager made sure of that by blasting a three-run, walkoff homer in the ninth, which also helped snap his personal slump at the plate for a day. Seager’s home run — his second of the game and season — gave the Mariners a badly needed 5-3 win Wednesday against the Astros in front of a crowd of 13,739.

That is the good news. What comes next could prove to be just as important for the rest of the Mariners’ season, which looks far colder than the team’s hot start hinted at.

The Mariners are 8-13 and 5½ games back of the first-place Rangers.

“I said when I took the job that I wanted them to take on my personality,” manager Lloyd McClendon said. “And I think you guys can see: I didn’t have any panic. The fact is, you’re going to have losing streaks during the season. How you deal with them will define what type of team you become. Over a 162-game schedule, nobody said it was going to be a bed of roses every day.”

The Mariners have averaged just 2.8 runs since an impressive offensive showing in the first series of the season against the Angels. Abraham Almonte’s batting average is down to .213, Brad Miller is hitting .183 and Seager, despite his two-homer day, is still hitting only .179.

The Mariners rank 28th in the majors in runs scored while also ranking in the bottom four in batting average, on-base percentage and slugging percentage.

Seager’s five RBI helped thaw Seattle’s offensive freeze for a day, even if the rest of his teammates still struggled at the plate. The Mariners didn’t manage a hit until the fourth inning, and they had only two hits after six innings.