TORONTO — The New York Yankees hit four solo homers late in the game and took advantage of an early error from Troy Tulowitzki en route to a 7-0 win over the Toronto Blue Jays on Saturday.

Brett Gardner, Matt Holliday, Starlin Castro and Didi Gregorius all went deep off reliever Jason Grilli to put the game out of reach in the eighth inning.

But New York (32-21) had set the tone much earlier, scoring two unearned runs after a rare Tulowitzki fielding error in the third.

Tulowitzki, who came into the game with a career .985 fielding percentage, bobbled a ground ball from Rob Refsnyder with one out. Refsnyder stole second, advanced to third on a fly ball, and scored the game's first run on an Aaron Hicks double. Aaron Judge followed with a double of his own, plating Hicks for a 2-0 lead.

Joe Biagini (1-4) shouldered the loss but deserved a better fate. The right-hander, in his sixth start in place of injured pitchers in Toronto's rotation, allowed four hits and three runs — only one of them earned — over a career-high seven innings.

Biagini threw 100 pitches, surpassing his career-high of 95 set in his previous start.

The Blue Jays (27-29) couldn't solve New York starter Jordan Montgomery (3-4) all afternoon. The left-hander pitched six shutout innings, allowing just three hits and three walks while striking out five.

Relievers Adam Warren, Tyler Clippard and Dellin Betances continued the shutout.

Gregorius added an RBI double in the seventh for a 3-0 Yankees lead before the floodgates opened in the eighth.

Gardner started the barrage, leading off the inning by launching his 12th homer of the season over the right-field wall. Holliday, Castro and Gregorius followed with back-to-back-to-back homers — all with two out — making Grilli the first Blue Jays pitcher to allow four homers in a single inning.

Toronto's best scoring chance came in the bottom of the third inning when Luke Maile and Kevin Pillar reached on base hits with nobody out. But Montgomery got a pop fly from Josh Donaldson and struck out Jose Bautista and Kendrys Morales to end the threat.

The Blue Jays put another two runners on in the fifth, this time with two out, before Bautista stranded them with a ground out.

Maile had two of Toronto's three hits. New York had eight hits.

NOTES: Starting catcher Russell Martin sat out a third straight game with a sore neck. Manager John Gibbons said Friday that the problem was unrelated to the nerve issue in his left shoulder that landed him on the disabled list last month. ... Attendance was 47,226. ... The Blue Jays close out their four-game series against New York Sunday afternoon. Marcus Stroman (6-2, 3.28 earned-run average) starts for Toronto. The Yankees counter with Luis Severino (4-2, 2.93 ERA).