SEATTLE -- Robinson Cano delivered a sacrifice fly in the 12th inning as the Seattle Mariners avoided a sweep with 2-1 victory over Toronto on Wednesday, preventing the Blue Jays from extending their wild card lead.

Knuckleballer R.A. Dickey (10-15), who pitched five scoreless innings in his last start on Friday, came in on the 12th for his first relief appearance after 29 starts.

Guillermo Heredia reached on a two-base throwing error by third baseman Josh Donaldson to open the 12th. Ben Gamel followed with an attempted sacrifice bunt, and first baseman Ryan Goins appeared to have Heredia at third, but the ball popped out of Donaldson's glove on the tag.

Cano then followed with a run-scoring fly to left, quieting the decidedly pro-Blue Jays crowd, bolstered for the third straight game by thousands of fans from western Canada.

Nick Vincent (4-4) pitched two scoreless innings for the win.

After being blanked on two hits for eight innings, the Blue Jays tied it in the ninth on Jose Bautista's 19th home run, a one-out solo shot to left off closer Edwin Diaz.

The Mariners threatened in the bottom half when Leonys Martin singled with one out and stole second and third, but Mike Zunino and pinch-hitter Dae-Ho Lee struck out to end the inning.

Seattle shortstop Mike Freeman prevented the go-ahead run from scoring in the 10th with a diving grab of Kevin Pillar's one-out liner with a runner on third.

The Blue Jays escaped a bases-loaded jam in the 11th. Aaron Loup relieved with one out and walked Kyle Seager and pinch-hitter Franklin Gutierrez. After Leony Martin fouled out to first, Ryan Tepera relieved and advanced both runners with a wild pitch on his first pitch. Mike Zunino then walked to load the bases, but Freeman grounded out to first to end the inning.

Both starting pitchers were outstanding. Seattle's Felix Hernandez who was tagged for six runs in 4 1/3 innings in his last start, allowed two hits in seven innings, striking out four and walking three in a 112-pitch outing.

Sanchez gave up four hits, striking out five and walking three in six innings.

The Blue Jays threatened in the fourth when Josh Donaldson doubled to open and advanced on Encarnacion's hard ground out to second that bounced off Hernandez's leg. Hernandez then retired Bautista and Russell Martin on consecutive ground outs to third.

UP NEXT:

Blue Jays: After an off day Thursday, Toronto heads into the A.L East gauntlet with two series at home -- four games against the Yankees, followed by three against Baltimore, that has huge wild card implications. The Blue Jays then close the season with three games at first-place Boston. Toronto has not announced a starter for the first game of the New York series.

Mariners: Seattle is running out of time. The Mariners followed an eight-game winning streak by losing four out of five. Only one of their three remaining series is against a team ahead of them (Houston) in the wild card race. After a day off, the Mariners open a three-game series at Minnesota. LHP James Paxton (4-7, 3.88 ERA) starts the Friday opener. "The math is not good," manager Scott Servais said. "We're going to need some help and some other teams to help us along the way."