TORONTO -- Edwin Encarnacion hit an upper-deck homer in the fifth inning, then connected for a go-ahead home run in the seventh that sent the Toronto Blue Jays over the Boston Red Sox 9-7 on Tuesday night.
The Blue Jays ended a four-game losing streak and avoided the first 18-loss April in club history.
David Ortiz homered and drove in four runs for Boston, which had won five in a row and was trying for its first 19-win April.
Mike Carp and Jonny Gomes also connected for the Red Sox, who head into May with the best record in the majors for the 11th time in team history.
Encarnacion's pair of two-run shots marked the 10th multihomer game of his career and second this season. He has nine home runs this year.
Encarnacion became the 14th player to reach the upper deck in left field at Rogers Centre, tagging starter Jon Lester. Toronto trailed 7-6 when Encarnacion homered off Junichi Tazawa (2-1).
Steve Delabar (2-1) got two outs for the win. Casey Janssen finished for his seventh save in as many chances.
Lester came in 4-0 in five starts this month but allowed a season-high six runs and six hits in six innings. Lester had not given up so many runs since the Blue Jays scored 11 times in four innings against him last July 22 at Toronto.
Toronto opened the scoring in the first on Jose Bautista's RBI double off the center-field wall.
The Blue Jays made it 4-0 with a three-run third, taking advantage of a throwing error by catcher Jarrod Saltalamacchia. After Toronto loaded the bases, Saltalamacchia tried a pickoff at first, but the ball sailed into right field, allowing two runners to score. Two outs later, J.P. Arencibia hit an RBI double.
Ortiz led off the fourth with his third homer, and Carp added a one-out shot as Boston cut the deficit in half. Dustin Pedroia's RBI single in the fifth made it 4-3.
Encarnacion padded the Blue Jays' lead with his towering drive, the first upper-deck drive in Toronto since Shelley Duncan did it for Cleveland in 2011.
Since the stadium opened as SkyDome in June 1989, a total of 17 homers have reached the upper deck. Jose Canseco (three) and Josh Phelps (two) are the only players with multiple fifth-deck shots.
Gomes hit a pinch-hit homer in the sixth, and Boston took advantage of an error to score three times in the seventh against reliever Aaron Loup for a 7-6 edge.
Defensive replacement Munenori Kawasaki threw wide of second on a potential double-play grounder to shortstop and Pedroia walked to load the bases. Ortiz cleared them with a double over Bautista's head in right.
Colby Rasmus added some insurance with an RBI single off Joel Hanrahan in the eighth.
Blue Jays starter Brandon Morrow allowed three runs and six hits in five innings. He struck out seven, including five straight in the first and second innings.