For much of the night, it shaped up as a boilerplate Mariners’ forehead-slapping loss in the making.

A wasted Felix Hernandez gem? Check. Numerous squandered scoring opportunities? Check. Lots of flailing at-bats resulting in whiff after whiff? Check.

But this one had a surprise ending: A 4-2 Mariners’ victory in 10 innings as Kyle Seager came up with the elusive clutch hit, a two-out, two-run homer off left-handed reliever Robbie Ross.

Tom Wilhelmsen, returning to the closing role, nailed down his first save since June 10, and the Mariners have two rousing victories at Rangers Ballpark – traditionally an inhospitable locale for them — to start their trip.

“It’s big for us,’’ Hernandez said. “We needed that to finally come through here in this place.”

There were numerous supporting acts for Seager’s heroics – a line drive that manager Eric Wedge wasn’t sure was going to clear the fence. Wedge was screaming at Michael Saunders, the base runner at first, to start sprinting so he could score on a ball off the wall. Instead, it went over the wall.

“I knew I hit it pretty good, but it didn’t really get too high for me,’’ Seager said. “So I was hoping, let’s put it that way.”

It was the third hit of the game for Seager, and the first time in his career he has hit a go-ahead homer in the eighth inning or later.

“He’s a clutch hitter,’’ Wedge said. “He hits with no fear. Left-handers, right-handers, he’s going to give himself a chance.”

Also clutch was Saunders’ two-out walk that preceded Seager’s homer. Sidelined for nearly a week with a sore finger, he entered the game as a pinch-runner in the eighth, then battled from an 0-2 count to reach base.