SEATTLE (AP) -- Even with a stellar seven inning start from Jordan Lyles, the Houston Astros were staring at the possibility of a winless road trip and seven-game losing streak as they headed to the plate in the ninth inning.
An unearned run allowed in the eighth inning put the Seattle Mariners ahead 1-0 and seemingly ended the Astros hopes of a victory. They entered the game winless in 38 chances when trailing after eight innings and hadn't been able to score a single run in their last 17 innings against the Mariners.
But the Astros provided a first for the 2013 season as they rallied for six runs off the Mariners bullpen to steal the victory away from Seattle and snap their six-game losing streak Wednesday night.
''It's never too late when you're able to put together a six-run inning, especially after the woes we've had the last two games,'' Astros manager Bo Porter said. ''It was definitely good to see the guys break out and put together some good at-bats in the ninth inning.''
Trailing 1-0, Jason Castro and J.D. Martinez led off with a pair of singles and advanced to third on a sacrifice bunt from Carlos Corporan. After an intentional walk of Carlos Pena, Chris Carter doubled off the wall in left field to score a pair and give the Astros their first lead of the game. Another intentional walk loaded the bases again and brought the hook for Mariners closer Tom Wilhelmsen (0-2). It was Wilhelmsen's fourth blown save in his last nine tries.
Brandon Barnes drove in another run when his drive to left field glanced off the glove of Jason Bay and gave the Astros a 3-1 lead. Marwin Gonzalez drove in two more on a single to center off Yoervis Medina and Charlie Furbush walked in another.
''We score six in the ninth - we haven't had the offense lately but it just shows we can do it in a big situation like that,'' Carter said. ''It's good for the team.''
Paul Clemens (4-2) earned the victory for Houston.
Lyles posted his best start of the season in holding the Mariners scoreless through seven innings. He allowed just three hits, two walks and struck out a career-high 10 to keep the game level into the eighth inning.
''Jordan was outstanding again tonight,'' Porter said. ''...Even the times in which he got into trouble, you can see the look in his eyes and the patience and the poise of 'I'm going to make quality pitches to get out of this.' I thought the big strikeouts with the bases loaded was huge.''
Lyles' previous career-high for strikeouts had been eight coming into Wednesday night's game. Lyles struck out nine Mariners through the first four innings alone and retired the final 11 batters he faced.
''Curveball was pretty good tonight,'' Lyles said. ''We kept going to it - kept burying it in the dirt and guys are swinging over it.''
The Mariners had missed out on an opportunity to take the lead in the fourth inning off Lyles. Nick Franklin hit a one-out double off the wall in right field. Mike Zunino singled sharply to center field for the first hit of his major league career but Franklin was held up at third base. A walk loaded the bases but Brendan Ryan and Alex Liddi both struck out as Lyles worked out of the jam.
Mariners starter Jeremy Bonderman also pitched well. Bonderman allowed just three hits in eight innings. He walked two and struck out five before Wilhelmsen gave up the lead in the ninth. Mariners manager Eric Wedge said Wilhelmsen was missing up in the strike zone and the Astros were able to take advantage.
''The ninth inning is a different animal. You saw the next two guys struggled too,'' Wedge said. ''We've got to get Tom driving the ball downstairs - missing down. When he does miss we'll work on it.''
Endy Chavez singled for Seattle to lead off the eighth inning. Gonzalez picked up an error when he dropped the throw from Hector Ambriz on a bunt from Jason Bay that would have been in time to beat Chavez at second base.
After a pop out from Kyle Seager and strikeout by Raul Ibanez, Seager lined a single to right to drive in Chavez and give the Mariners their only run.
Notes: Mariners C Mike Zunino made his major league debut just over a year removed from being selected by Seattle in the first round of the 2012 MLB Draft. Zunino is the third catcher for Seattle to make their major league debut in the last 20 days joining Jesus Sucre and Brandon Bantz. ... Lyles is the ninth pitcher to strike out 10-plus Mariners in a game this season. ... With two more errors Wednesday night, the Astros increased their league-leading total to 51 for the season. ... It was the first win this season for Houston when trailing after eight innings. The Astros were 0-38 when trailing after eight innings entering Wednesday night. ... Houston's six-run ninth inning matched their highest scoring inning of the year. The Astros had scored six runs in the sixth innings against the Colorado Rockies on May 30.