The Toronto Blue Jays had the matchups they needed in the eighth inning and the percentages were in their favor against the Seattle Mariners on Monday night.

But the Mariners beat the odds and the Blue Jays as Mike Carp and Casper Wells hit back-to-back home runs for a 6-5 comeback victory.

Leading 5-4 entering the eighth, left-hander Trever Miller was called on to face Dustin Ackley and Carp, both left-handed hitters. Ackley grounded out but Carp hit an 0-2 breaking ball into the seats in right field to tie the game 5-5.

It was the second home run for Carp, who connected in the third to extend his hitting streak to 15 games. He has 17 RBIs in August, most in baseball for the month.

Blue Jays manager John Farrell lifted Miller and brought in right-hander Jon Rauch (5-4) to face the right-hand-hitting Wells.

Wells, down 1-2 in the count, hit a slider into the bullpen in left.

"We get hitters in the position where we can finish them off, given the count and both Trever worked to Carp and Rauch worked to Wells," Farrell said. "Then two breaking balls on an 0-2 count and a 1-2 count.

"They did a good job of putting the bat on the ball. Mistakes made with location cost us the two solos."

Miller, a left-handed specialist, was acquired from St. Louis on July 27 for this kind of situation.

"That is exactly where we were with both Ackley and Carp coming up," Farrell said. "I felt like left-on-left was the matchup that was made for Miller in that case."

Miller, who has had the most appearances in baseball for a lefty (586) since 2003, said his pitch to Carp "was top five worst pitches I've thrown in a game with a one-run lead. He did what he is supposed to do with that ball, hit it in the seats.

"I simply didn't execute that pitch. It cost us the game. That's my role to come in but one bad pitch can be catastrophic."

Rauch, who was not available for comment, has allowed 13 hits and seven earned runs over his last eight innings.

Wells has homered in his last three games.

"I think it was a slider, pretty good pitch. I don't know. I just closed my eyes and swung, I guess. I don't really know," said Wells, who arrived in a July 30 trade with Detroit.

Eric Thames and Adam Lind had two-run home runs for the Jays and Brett Lawrie had a solo shot.

Tom Wilhelmsen (1-0) earned his first major league win by working a 1-2-3 eighth inning.

Brandon League, a former Blue Jay, earned his 30th save in 34 opportunities.

"It was a great feeling. It sounded like I had a lot of people behind me, which is awesome," said Lawrie, who grew up in nearby British Columbia. His sister, Danielle Lawrie, was the national player of the year and led the University of Washington to the 2009 NCAA softball title so he had plenty of support and media attention.

"I got a good pitch to hit and was fortunate enough to get the bat on the ball and hit it deep," said Lawrie, who is hitting .343 with three home runs and eight RBIs in 10 games. "But obviously, a win right now would be much more thrilling."

It was a rollicking first four innings, with nine runs and four lead changes.

The Jays got to Michael Pineda quickly. Yunel Escobar drew a game-opening walk and Thames connected on a first-pitch fastball, sending it deep into the seats in right field for his seventh homer.

The Mariners responded with three runs in the second off Henderson Alvarez, who was making his second major league start. Alvarez hit Wells in the back to open the inning. With one out, Trayvon Robinson drove a fly ball over the head of Thames in left. He stretched for it at the warning track but it caromed off his glove for a RBI double.

Kyle Seager walked then Jack Wilson directed a single through a hole on the right side to scored Robinson and send Seager to third. Ichiro Suzuki followed with a sacrifice fly that made it 3-2.

Pineda brewed the same formula for trouble in the third, walking Jose Bautista followed by Lind's two-run shot that just cleared the wall in right, his 21st.

Carp tied it with his fifth home run over the wall in left-center with one out in the third. He has reached base safely in 24 straight games.

Lawrie then hit his third home run in just his 10th game for the Jays, a leadoff shot in the fourth for a 5-4 lead.

Alvarez went five-plus innings, allowing four runs and six hits. He walked one and struck out three.

Notes: Edwin Encarnacion had his 13-game hitting streak ended. It was the longest for the Jays this season. ... The Jays have hit at least one home run for nine straight games, the second longest streak this season. ... LHP Jason Vargas (7-10) takes the mound for the Mariners on Tuesday. In his last start, he went seven innings against Texas, allowing six hits and three runs. Vargas is 0-1 with a 4.96 ERA in three starts against Toronto. ... Rookie LHP Brad Mills (1-2, 6.46) will be making his fourth major league start for the Blue Jays.