TORONTO -- It's been a while between wins for Dallas Keuchel.
But the Houston Astros left-hander finally earned his first victory since June 15, despite giving up six runs in a season-high 7 1/3 innings on Saturday.
The Astros used three home runs, including a three-run blast by Chris Carter in the first, and hung on to defeat the Toronto Blue Jays, 8-6, at Rogers Centre to end a three-game losing streak.
Matt Dominguez drove in two runs for the Astros with a solo home run and a single, and Justin Maxwell added a solo home run before a crowd of 34,317.
"Dallas did a great job," Astros manager Bo Porter said. "Early on, his pitch count started to get up there, but he did a great job in the last three innings of minimizing it and really getting on the attack and forcing them to swing the bat."
Keuchel (5-5) allowed 10 hits, including a three-run home run by Jose Bautista in the eighth and solo shots by Mark DeRosa and Colby Rasmus. He allowed one walk and struck out six.
Jose Veras pitched 1 2/3 innings to earn his 19th save.
"I feel like I made a good pitch to Bautista, he was just strong enough to get it out," Keuchel said. "That's as good of a lineup as I've faced in my year and half here."
Since his previous win, Keuchel had four no decisions and two losses.
Blue Jays right-hander Josh Johnson (1-7) continued to struggle, as his earned-run average soared to 6.08. He allowed seven hits including three home runs, two walks and seven runs while striking out eight in 5 2/3 innings.
"I've just got to make better pitches," Johnson said. "I make some OK pitches, but I make some terrible ones as well."
Johnson has lost his last five starts this season and is 0-4 in his career against the Astros.
"He's scuffling; that's an understatement," Blue Jays manager John Gibbons said. "He's human; you feel for the guy. He hasn't struggled a whole lot in his career.
"He's trying to contribute. It's tough because there's really no way to hide out there."
Johnson said his rough season has been a test of his confidence.
"It's not real high, but you've got to find a way to stay positive and find a way to get through it and be better because of it," Johnson said.
The Astros scored four runs in the first inning, three on the 19th home run of the season by Carter. Jonathan Villar, Jose Altuve and Jason Castro started the game with singles to make it 1-0.
Carter hit his home run to center field on a first-pitch fastball.
"It's always good to get a win and get that positive vibe going again," Carter said. "I was just looking for anything I could drive early in the count, not get behind and give him a chance to throw his pitches."
Porter said: "Those guys that have good stuff like Josh Johnson, you want to get to them early and you want to stay on them. We got the four runs in the first and then he started to get into a groove."
The Blue Jays scored in the bottom of the first on a single by Edwin Encarnacion that scored Melky Cabrera, who singled and took second on a wild pitch.
DeRosa turned on a first-pitch cutter to lead off the Blue Jays' second with a home run to left, his seventh of the season and the 100th of his career.
Maxwell hit his second home run of the season with one out in the fourth, followed by the 13th home run of the season by Dominguez to give the Astros a 6-2 lead.
Rasmus hit the first pitch of the bottom of the fifth to right for his 17th home run of the season and trim the lead to three runs.
The Astros added a two-out run in the sixth when Maxwell was hit by a pitch, stole second and came home on a single by Dominguez. Juan Perez came in to get the final out of the inning.
Perez walked Villar and Castro in the seventh, and Brett Wallace singled to make the score 8-3.
Bautista's 24th home run of the season followed one-out singles by Jose Reyes and Cabrera to cut the lead to 8-6. Veras replaced Keuchel.
NOTES: Astros OF J.D. Martinez (left wrist sprain) was put on the disabled list following Friday's game after he was injured sliding into second base. OF Robbie Grossman was recalled from Triple-A Oklahoma City to take his place. ... RHP Paul Clemens was optioned to Triple-A Oklahoma City and has been replaced in the Astros bullpen by LHP Brett Oberholtzer, who was recalled from the RedHawks. ... Jose Altuve left the game in the seventh because of a tight quadriceps. .... Edwin Encarnacion was the first Blue Jay to have five RBIs in one inning in Friday's eight-run seventh, when he hit two home runs including a grand slam in a 12-6 victory over the Astros. ... The Blue Jays will start RHP Todd Redmond (1-1, 4.43 ERA) in Sunday's series finale against the Astros' Jarred Cosart (1-0, 0.60 ERA).