SEATTLE — Myles Straw led off the 14th inning with a triple and scored on Yuli Gurriel’s sacrifice fly, and the Astros outlasted the pesky Mariners 8-7 on Thursday in the longest game of the season by innings for both teams.

The Mariners staged tying rallies in the ninth and 10th innings and loaded the bases in the bottom of the 14th thanks to three walks by Chris Devenski (1-0), but the right-hander got Shed Long to fly out to end it.

The Astros led 5-1 after 61/2 innings, but the Mariners chipped away, tying it at 6 in the ninth on Edwin Encarnacion’s single against closer Roberto Osuna. That prevented Justin Verlander from becoming the first 10-game winner in the AL.

Josh Reddick’s sacrifice fly as a pinch-hitter in the 10th gave the Astros to a 7-6 lead before Omar Narvaez tied it with his ninth homer of the season.

Matt Festa (0-1) allowed Straw’s triple — a ball that was played poorly by right fielder Domingo Santana — and one walk in the 14th for the Mariners.

Mariners outfielder Mitch Haniger left in the seventh with what the team called a “mid-body” contusion.

The Astros took three of four in the series and are 9-0-1 in their last 10 series.

It was the first blown save of the season for Osuna. Verlander allowed three runs, five hits and no walks in 61/3 innings.

Robinson Chirinos homered for the four consecutive game, tying Cliff Johnson’s club record from 1975 for longest streak.

Alex Bregman hit his 18th homer in the victory.