TORONTO (AP) -- Edwin Encarnacion has been working hard to fix his timing at the plate in recent days.
Looks like's he's found it.
Encarnacion hit two home runs in one inning, including his sixth career grand slam, Jose Reyes, Adam Lind and Brett Lawrie also went deep and the Toronto Blue Jays beat the Houston Astros 12-6 on Friday night.
''I got my timing back, so I was seeing the ball good,'' Encarnacion said.
Encarnacion became the first Blue Jays player in nearly 20 years to homer twice in the same inning when he accomplished the feat in the seventh against Paul Clemens (4-4) and Hector Ambriz.
''I don't think you can get any better than that,'' manager John Gibbons said. ''He's having another great year.''
The last to do it was Joe Carter, who went deep twice in the second against Baltimore on Oct. 3, 1993.
For Encarnacion, the home runs were his 27th and 28th of the season, the third-most in baseball behind Chris Davis and Miguel Cabrera.
''It was unbelievable what he did today,'' Reyes said. ''We're going to need Edwin, he's been huge for this team.''
Colby Rasmus had four hits and Reyes three as the Blue Jays won consecutive games for the first time since their franchise-record tying 11-game winning streak ended on June 24. Toronto had gone 8-19 since.
Brett Cecil (4-1) pitched two-thirds of an inning for the win, handing the Astros their 21st loss in 26 games.
''We have to do a better job,'' Astros manager Bo Porter said. ''It doesn't matter about the other team is going to do. We have to do a better job of making quality pitches in those situations.''
Toronto trailed 6-4 to begin the seventh before Encarnacion and Lind tied it 6-6 with back-to-back homers off Clemens, the second time this season the Blue Jays have gone back-to-back. Lind's homer was his 12th.
Rasmus and Maicer Izturis followed with doubles, giving the Blue Jays their first lead at 7-6.
''I just got my butt waxed there for a minute,'' Clemens said.
Wesley Wright came on after Lawrie walked and Josh Thole was hit by a pitch to load the bases, but Wright walked Reyes to bring in the eighth Toronto run.
Melky Cabrera fouled out before Ambriz came on and got Jose Bautista to pop up. That brought up Encarnacion again, and he lined a 3-2 pitch into the left field bullpen to cap an eight-run outburst.
''It did unravel rather quickly,'' Porter said. ''They put some good swings on some pitches and you look up and it's an eight-spot.''
Encarnacion said he wasn't certain his second drive would be high enough to clear the fence.
''I hit that ball good, but I didn't think it was going to go,'' he said. ''But I hit it good.''
Toronto's late rally helped take R.A. Dickey off the hook for what would have been his fourth straight defeat. Dickey allowed five runs and seven hits in six innings. He walked two and struck out eight.
''I picked a good night to be very mediocre,'' Dickey said.
The Astros prepared to face Dickey by taking swings in an indoor cage before the game against former major league knuckleballer Steve Sparks, now a Houston radio announcer.
''That was very helpful, especially coming from my end where I'd never seen one in a game,'' said Houston's Marc Krauss, who homered and drove in a career-high four runs. ''Definitely gave me a little better idea of what I was going to face.''
Houston lost for the sixth straight game started by Jordan Lyles. The right-hander allowed four runs and nine hits in five-plus innings, walked three and struck out one.
''Jordan did a great job of battling,'' Porter said. ''He didn't have his best stuff tonight and he battled and gave us everything he had.''
The Astros opened the scoring when Krauss connected off Dickey in the second, a drive that bounced off the top of the right field wall.
The homer was the 24th off Dickey this season, matching his total from 2012, when he won the NL Cy Young Award with the New York Mets. Eighteen of the home runs against Dickey this year have come at home.
''I'm trying to remain optimistic because I feel like the same guy I was last year and it is frustrating not to get the same results,'' Dickey said.
Dickey is tied with Angels right-hander Joe Blanton for the most home runs allowed in the majors this season.
Toronto tied it with two in the third. Reyes hit a solo homer, his seventh, before Cabrera doubled, moved to third on a balk and scored on Bautista's sacrifice fly.
Krauss put the Astros back in front with a two-run double in the fourth, but Houston couldn't hold the lead. Lawrie cut it to 4-3 with a solo homer off Lyles in the fifth, his seventh, and Rasmus made it 4-all with an RBI double in the fifth.
Houston responded again in the top of the sixth. Brett Wallace led off with a double, moved to third on J.D. Martinez's single and scored when Krauss grounded into a double play.
Jason Castro padded Houston's lead with an RBI single in the top of the seventh but Clemens let it slip away in the bottom half.
NOTES: Martinez left in the seventh with a sprained left wrist suffered when he slid awkwardly into second base while trying to break up a double play. Porter said Martinez will go on the 15-day DL, with OF Robbie Grossman coming up from Triple-A Oklahoma City. ... The Blue Jays matched a team record with 12 extra-base hits. It's the fifth time they've done it. ... Reyes has gone 6 for 7 with two walks in the first two games of this series. ... Toronto is 27-27 at home.