TORONTO -- The Toronto Blue Jays won the type of game Tuesday that they usually have been losing.
An error on a likely inning-ending, double-play grounder in the seventh inning set up a three-run double by David Ortiz, and the Blue Jays who earlier held a four-run lead, fell behind the Boston Red Sox.
However, in the bottom of the inning, Edwin Encarnacion hit his second two-run homer of the game, and the Blue Jays snapped a four-game losing streak with a 9-7 victory.
The win by the Blue Jays before a crowd of 22,915 at Rogers Centre ended a five-game winning streak by the Red Sox.
"Winning a game like this, it's what we need right now, winning this kind of game by one, two runs," said Encarnacion, who hit his eighth and ninth homers of the season.
The Blue Jays added a run in the eighth against Joel Hanrahan on a single by J.P. Arencibia, a sacrifice by Maicer Izturis and a single Colby Rasmus.
"The guys showed a lot of guts today, a lot of heart," Toronto manager John Gibbons said. "We gave up that lead there, but they hung tough. Just a big win, something we needed."
Red Sox manager John Farrell said, "I thought we did a great job of fighting back into this. They've got a quick-strike offense, and they swung the bats very well tonight."
The best-struck ball came in the fifth inning, when Encarnacion's first homer of the game went into the 500 level at Rogers Centre.
With the blast off left-hander Jon Lester, Encarnacion became the 14th player to reach the 500 level with a home run. It's the 17th time the feat has been accomplished.
The only question was whether the ball would stay fair.
"Yeah, I thought it was going to go foul, that's why I stayed at home plate watching the ball to see if it was going to stay fair," Encarnacion said.
"He's been on some kind of roll lately," Gibbons said. "Early on, he was hitting a lot of balls on the money and wasn't getting anything to show for it, but he's found that groove."
Lester said, "That was probably the biggest blow of the game for me. It was one of those nights for me. From pitch one, I just wasn't able to repeat the ball down in the zone, and that's big. The curveball just kind of rolled in there, and I didn't have a very effective changeup."
Steve Delabar (2-1) picked up the win, and Casey Janssen earned his seventh save.
Ortiz, Mike Carp and Jonny Gomes each hit solo homers for the Red Sox.
Toronto shortstop Munenori Kawasaki, a defensive replacement, was charged with an error on a potential double-play grounder by Daniel Nava with one out in the seventh. Delabar replaced left-hander Aaron Loup and walked Dustin Pedroia to load the bases before Ortiz's bases-clearing double.
The Blue Jays came back in the home seventh when Jose Bautista worked a two-out walk from Junichi Tazawa (2-1) to set up Encarnacion's heroics.
"You've got to give them a little credit because they battled every pitch," said Red Sox catcher Jarrod Saltalamacchia, whose throwing error in the third allowed two runs to score. "There weren't too many guys who were swinging at the first pitch, rolling over. They battled."
Blue Jays starter Brandon Morrow allowed six hits, including two homers, and three runs while striking out seven in five innings. He is still looking for his first win of the season.
Lester allowed six hits and six runs (five earned) in six innings.
NOTES: Lawrie batted leadoff for the second game in a row, and he could see long-term duty there while SS Jose Reyes (ankle) is on the disabled list. Reyes is not expected to return until July. ... Hanrahan, who had been out with a hamstring injury, was activated from the 15-day disabled list before the game. RHP Daniel Bard was optioned to Triple-A Pawtucket after Sunday's game to clear a roster spot. ... Boson LHP Craig Breslow (shoulder) is scheduled to make his next rehabilitation appearance with Pawtucket on Thursday. ... LHP Mark Buehrle (1-1, 6.35 ERA) will start Wednesday for Toronto against Boston RHP Clay Buchholz (5-0, 1.19 ERA). ... Toronto LHP J.A. Happ will start Thursday's series finale. The Blue Jays hope that RHP Josh Johnson (triceps) can start Saturday against Seattle so that RHP R.A. Dickey (back) could be given an extra day before pitching Saturday.