TORONTO — The air in the Blue Jays' clubhouse, home to US$135 million-plus in baseball salaries, got a little richer Sunday as members of Team Canada dropped in to say hello.

Carey Price, Steven Stamkos, John Tavares, Shea Weber and others, some wearing Blue Jays hats, came bringing gifts in the form of Canada jerseys.

In return, they got a lesson in perseverance from the Jays who fought off a ninth-inning New York comeback with one of their own to edge the Yankees 4-3 before a Rogers Centre capacity crowd of 47,896 with the lid open, the 38th sellout of the season.

The powerhouse Canadian hockey team may not need the help. It has taken care of all-comers ahead of the best-of-three final against Team Europe starting Tuesday. But no doubt the players enjoyed the drama of another successful step in the Jays' playoff push. With the dome empty, Stamkos fielded some balls at shortstop from Josh Donaldson after the game.

The Yankees, who had been shut out their three previous games, had gone ahead 3-2 after getting to Toronto closer Roberto Osuna for two runs in the ninth.

Osuna (3-2) gave up singles to Mark Teixeira and pinch-hitter Billy Butler. Then, with one out, Mason Williams' RBI single tied the game at 2-2. And the Yankees went ahead on Ronald Torreyes' sacrifice fly.

Melvin Upton Jr. walked to open the bottom of the ninth and moved to third on a Kevin Pillar single off Tyler Clippard (1-3). Upton scored on Ezequiel Carrera's bunt with Clippard given an error on the play.

Devon Travis struck out and Donaldson was walked intentionally to load the bases for Edwin Encarnacion, who slashed a single through the right side of the infield to score Pillar. That brought the jubilant Jays out of the dugout for a celebration.

Toronto left 10 on base to New York's seven.

"It was a good game today, a great game today. Well-played baseball," said Jays starter Marco Estrada, who pitched seven strong innings. "We bunted a few times which was huge. I like seeing these things. We don't always need a homer to win these games. So it was a fun game to watch."

Toronto (86-69) has won five of six — and seven of 10 after a 3-9 start to September. Over the season, the Jays are 19-24 in one-run games, winning their last five.

"We've been playing good baseball the last week," said manager John Gibbons.

"It looks like it's a pretty good sign. We'll see," he added.

New York (79-76) has lost four straight and is 2-8 going into the series finale Monday, which marks the end of an 11-game, 12-day road trip.

"We've been fighting and fighting," lamented manager Joe Girardi. "You think about some of these games we've lost, they've been really tough. We've gotten good pitching performances, we've lost in a number of different ways. It's just been tough."

Also Sunday the AL East-leading Red Sox stayed 5 1/2 games up on Toronto by beating Tampa 3-2 in 10 innings for their 11th straight win. Boston clinched a playoff berth with a win over the Rays on Saturday.

Wild card rivals Detroit lost 12-9 to Kansas City and Baltimore edged Arizona 2-1. The Jays hold the top AL wild-card spot, leading Baltimore by a 1 1/2 games and Detroit by three.

Jose Bautista, whose three-run blast gave the Jays a 3-0 win Saturday, looked to have delivered the win with an RBI single in the eighth for a 2-1 lead. Bautista had opened the scoring with a solo homer in the fourth.

Didi Gregorius hit a solo homer to open the seventh, ending a 33-inning scoreless drought for the Yankees. New York's shutout sequence in Toronto was even longer, dating back to the second inning of a game May 31 — a 40-inning drought that is a Jays franchise record against a single opponent.

One day after a pitching duel between Marcus Stroman and Yankees veteran C.C. Sabathia, Estrada and Michael Pineda dominated on the mound.

Estrada was sharp in a 1-2-3 first, befuddling Yankee batters with his 73 mile-per-hour changeup. He loaded the bases with one out in the second on a double, walk and single but escaped unscathed with a strikeout and popup.

Including those two outs, the Jays right-hander retired 14 in a row before Gregorius homered to right-centre field for his 20th of the season.

Pineda, meanwhile, dispatched 13 of 14 with the Bautista blast the sole blemish during a run that started with two outs in the first and ran through the fifth inning.

The six-foot-seven 260-pounder struck out seven, including a sequence of five straight in the second and third innings, to become the first Yankee to reach the 200 strikeout plateau in a season since Sabathia in 2011.

Pineda went 5 2/3 innings giving up one run on three hits with three walks in a 97-pitch outing. His nine-start winless streak (0-1 with eight no-decisions) is a career high although he probably deserved better Sunday. Pineda's last win was Aug. 5 against Cleveland.

He retired eight straight after walking Bautista in the first. The Jays slugger ended that run in the fourth with his solo drive over the left-field fence on a 2-1 delivery for his 21st of the season.

The Jays blanked the Yankees 9-0 and 3-0 in the first two games of the series, which followed a 2-0 shutout at the hands of the Rays. It marked the first time New York has been shut out in three straight games since July 1975.

The Yankees, who managed a total of just six hits in the first two games of this series, have lost eight straight at Rogers Centre.

Bautista's first-inning walk extended his streak of reaching base safely to 32 straight games.

The game started on a sombre note with a moment of silence to remember Marlins star pitcher Jose Fernandez, who died in a weekend boat accident.

Follow @NeilMDavidson on Twitter