SEATTLE -- Jean Segura scored the winning run on a wild pitch with two outs in the ninth inning, as the Mariners rallied past the A's for a 7-6 walk-off victory at Safeco Field on Saturday night.

"For me, the way Jean Segura played tonight, that's the Jean Segura we saw earlier in the year," Mariners manager Scott Servais said. "He was aggressive on the bases, was driving the ball, made great plays at shortstop. [He] was looking to score that winning run when the ball gets away from the catcher. That's the way he needs to play and we're a different ballclub when he plays that way. Outstanding game from him today."

Segura, who was 3-for-5 with two doubles and a home run, reached on a fielding error by Oakland first baseman Matt Olson to lead off the ninth, and Yonder Alonso followed with a single to right field. The A's elected to walk Robinson Cano to load the bases, and almost got out of it unscathed, before Blake Treinen's 0-1 slider to Mitch Haniger got under the legs of catcher Bruce Maxwell.

"I just didn't get my glove down in time," Maxwell said. "It's on me. [Treinen] executed, and I missed the ball to lose the game. That's how it works sometimes."

Seattle's Mike Zunino tied the game with a solo home run to right-center field in the eighth, as the Mariners (68-68) kept pace in the American League Wild Card chase, staying 3 1/2 games back of the Twins for the second spot.

The Mariners relied on the long ball, as Cano walloped a two-run homer in the third while Segura and Alonso slugged back-to-back homers in the fifth.

Maxwell and Khris Davis each launched solo home runs, and Matt Joyce joined the party with a three-run shot in the fourth to put A's up 5-2. Ryon Healy tacked on another run with a sacrifice fly to plate Jed Lowrie.

A's starting pitcher Jharel Cotton (5.53 ERA) allowed four runs over four innings on seven hits, including three homers. The Mariners' Yovani Gallardo (5.79 ERA) lasted only three innings, allowing two runs on five hits and two home runs.

"You want to go out there and put up zeros for your team to give them a chance to win," Cotton said. "Today I didn't do that, causing the bullpen to come in early."

Zunino stays hot: Zunino showcased his power in the eighth, launching an opposite-field home run to right-center field to tie the game at 6. It was the third homer in the last nine games for Zunino, who entered Saturday's contest hitting .393/.452/.714 since Aug. 22.

"I don't think he absolutely killed [it], but he does have some kind of power to the opposite field," Servais said. "He's back in a good groove again. Staying on balls, driving them to right-center. It's a special talent. It really is, and it's really fun to watch him play."