TORONTO — After allowing two earned runs on three hits in the first inning, Aaron Sanchez knew he had to make adjustments to avoid his second consecutive loss.

The 24-year-old right-hander made the necessary changes holding the Astros scoreless in the following six innings as the Toronto Blue Jays defeated Houston 4-2 on Saturday afternoon.

"I just told myself, 'Keep 'em there as long as you can give the team a chance to win the game late'," said Sanchez, who struck out six over seven innings while allowing five hits and walking three for his 12th win. "(Collin) McHugh was on his game pretty much the whole time after that too so my thinking was just to make pitches and give these guys a chance to win the game."

Josh Donaldson hit a solo home run in the first inning and Russell Martin added a three-run shot in the sixth as the Blue Jays (66-51) avoided a second consecutive loss and have now won four of six meetings with the Astros this season.

The loss snapped Houston's (61-56) four-game win streak.

Mired in a 1-for-20 slump, Martin took James Hoyt's 3-2 slider over the wall in centre field for his ninth home run of the season, erasing a 2-1 deficit.

"Any time you get in a leverage count where you can kind of pick a certain pitch in a certain spot, makes for a more comfortable at-bat," Martin said. "I wasn't sure I got enough of it. As soon as I saw (Teoscar Hernadez) running back, it didn't look like he was going to catch it that was good enough. When it went over the fence, it was even better."

Sanchez (12-2) got into trouble early as the Astros took a 2-0 lead on Carlos Correa's two-run double in the first. Donaldson responded for the Blue Jays in the bottom half of the first, taking McHugh's 2-2 fastball over the wall for his 28th home run of the season cutting Houston's lead to 2-1.

"Just had to make an adjustment out there," said Martin. "It seemed like they were just going to jump on the heater early in counts and they were taking good swings off of it so we kind of had to mix it up a little bit, throw some more breaking balls and some off-speed. He did that.

"Kind of got them off the fastball just enough and once he shows he has the ability to do that, it kind of takes away some of the aggressiveness."

The Blue Jays didn't get to McHugh again until the sixth.

Edwin Encarnacion and Michael Saunders reached on back-to-back singles with one out, ending McHugh's day after 5 1/3 innings. Two batters later, with Hoyt on in relief, Martin knocked in his second homer of the month giving Toronto a 4-2 lead.

McHugh (7-10) allowed three earned on five hits while striking out six and walking two in the loss.

Houston threatened in the eighth as Jose Altuve hit a two-out triple off of reliever Jason Grilli. However, the veteran right-hander got Correa swinging on a fastball to end the inning.

Roberto Osuna pitched a scoreless ninth for his 26th save of the season. The 21-year-old tied a Major League Baseball record for most saves (46) before his 22nd birthday.

"It means a lot, obviously," said Osuna. "Thank God for the opportunity to be here and obviously the Blue Jays because they were the first ones to trust in me so, thanks a lot."

Note: Blue Jays RHP Marcus Stroman (8-5, 4.76 ERA) gets the ball on Sunday afternoon in the series finale while the Astros will counter with RHP Mike Fiers (8-5, 4.46 ERA).