SEATTLE (AP)  Leonys Martin needed a few looks to figure out Ryan Madson”s changeup, and then he solved the offspeed pitch in a big way.

Martin hit a game-ending, two-run homer off the closer in the ninth inning to give the Seattle Mariners a 6-5 comeback victory over the Oakland Athletics on Tuesday night.

“I”ve faced him a few times and he”s never thrown me a changeup,” Martin said. “I don”t even know what the action on the ball (is). … I just see the ball and swing and don”t get too aggressive.”

Seattle trailed 5-2 after seven innings but got a two-run homer from Robinson Cano in the eighth off John Axford.

Madson (2-1) came on in the ninth and got two quick outs before Norichika Aoki punched a double down the left field line.

Martin then drove a 1-2 pitch deep over the wall in right-center for his ninth home run.

“I slowed him down with four changeups in a row,” Madson said. “The last one was pretty much right down the middle. That”s the frustrating part, is the location of the last one. I”ve gone four in a row before, but you make the fourth one the best one. That”s not what happened tonight.”

Martin, whose previous season high was eight homers in 457 at-bats in 2013 with Texas, showed the black bat afterward with the seams of the ball visible on the barrel.

“As soon as I hit the ball, I knew it was going to be gone,” Martin said. “I crushed the ball. I was just trying to put the ball in play.”

Oakland erased a 2-1 deficit in the sixth, jumping on the Mariners bullpen to complete a four-run rally capped by Coco Crisp”s bases-loaded double off Mike Montgomery.

Montgomery (2-0) wasn”t charged with the runs and finished the game with 3 1/3 scoreless innings.

Cano put the Mariners up 1-0 in the first, following a one-out single by Seth Smith with an RBI double to left-center.

Crisp brought the A”s even in the third with his fourth homer, a one-out solo shot to right off Nathan Karns.

“It speaks a lot to the character of our club and all I can say is ”wow,”” Mariners manager Scott Servais said. “They just don”t quit. The huge home run by Robbie to get us close, Aoki huge hit with two out and Leonys, what can you say? Mike Montgomery. A lot of heroes in tonight”s game. Keep fighting, keep battling and we have something good going on in the clubhouse. It”s a lot of fun.”

RED-HOT CANO

Cano”s three RBIs pushed his total to 42, tops in the majors. He has reached safely in 23 consecutive games, hitting .344 (33 for 96) over that span with five homers, 10 doubles and 18 RBIs.

BETTER OUTING FOR GRAVEMAN

Oakland starter Kendall Graveman allowed two runs on seven hits in 4 1/3 innings, but that was an improvement over his previous five starts in which he was 0-5 with a 7.92 ERA.

TRAINING ROOM

A”s: 2B Jed Lowrie, on the DL with a bruised shin, was 1 for 4 in a rehab appearance on Monday for Triple-A Nashville. He is scheduled to be activated Wednesday and in the lineup. “I think as far as the psychology goes, we”ve been subtracting, and now we”re on the verge of having a couple additions,” manager Bob Melvin said. “I think that will certainly be welcome. I know Jed”s looking forward to getting back in the lineup.”

Mariners: SS Ketel Marte said his injured left thumb continues to improve, but he”s being cautious. “It”s better than yesterday,” said Marte, who is on the 15-day DL. “It”s hard, because I want to play.”

UP NEXT

A”s: Zach Neal will be called up Wednesday from Nashville to make his first major league start. The right-hander was 5-1 with a 2.53 ERA in seven starts with the Sounds. He was previously called up May 11 for one game and made his debut with three innings of relief against the Red Sox, allowing three runs on four hits in three innings.

Mariners: Right-hander Hisashi Iwakuma (2-4, 4.39 ERA) is 2-1 with a 4.07 ERA in four starts in May after going 0-3 in five starts in April. In his only start against the A”s this season, he allowed just one run on four hits in seven innings in an 8-2 victory.