Well, how about this?

Just when it appeared the Mariners were headed toward a ninth straight loss Wednesday afternoon, Kyle Seager unloaded a three-run homer that delivered a 5-3 walk-off victory over the Houston Astros.

It was Seager’s second homer of the game, and it erased what loomed as another frustrating loss. He jumped a first-pitch offering from Josh Fields, who simply started walking toward the dugout without turning to look.

The Mariners, trailing 3-2, opened the ninth inning with singles by Robinson Cano and Corey Hart. After Michael Saunders replaced Hart as a pinch-runner, Justin Smoak struck out.

Seager then sent a no-doubt fly to right that brought the Mariners cascading out of their dugout. Fernando Rodney, 1-1, got the victory. Fields, 0-1, was the loser.

Seattle starter Chris Young battled early command problems, which proved costly in a two-run third, but yielded just three runs and four runs in seven innings.

But three runs tend to go a long way these days against the M’s, who had scored two or fewer in nine of the previous 13 games.

The Astros took a 2-0 lead on Jason Castro’s two-out double in the third and added a run on Chris Carter’s leadoff homer in the seventh. That was enough for Jared Cosart, 2-2, and the Houston bullpen.

Cosart entered with a 7.36 ERA but held the Mariners scoreless until Seager’s first homer, a two-run blast in the seventh inning.

Young worked around a one-out single in the first and a one-out walk in the second before paying a fine for walks to Matt Dominguez and Dexter Fowler in the third inning.

Castro yanked an 85-mph fastball into the right-field corner for a two-run double.

Cosart set down the first seven Mariners before issuing a one-out walk in the third to Dustin Ackley before retiring the next two hitters.