BOSTON — J.A Happ, a possible trade target for the Yankees, has not putting his best foot forward recently. On Wednesday, the left-hander was undone by one bad inning in which he also was a victim of some shoddy defense.

Mookie Betts, Boston’s normally mild-mannered right fielder let loose with some emotion after ending a marathon at-bat with a grand slam off Happ in a 13-pitch at-bat that helped lead the Red Sox to a 6-4 win over the Blue Jays on Thursday night.

“I almost went down,” Betts said with a chuckle after going 2 for 4 with five RBIs. “I had to depend on my athletic ability and it came through that time.”

That ability has Betts leading the majors in batting and the Red Sox riding a 10-game winning streak to the best record in the big leagues. Boston has the longest current winning streak in the majors and hasn’t lost since getting routed 11-1 at Yankee Stadium on July 1.

Betts fouled off seven pitches from the All-Star lefty before driving the 13th pitch well over the Green Monster and out of Fenway Park to put the Red Sox up 5-2 in the fourth inning. Betts turned to his dugout and shouted at teammates in celebration, then almost lost his footing on the way to first base.

“Since I’ve been in the big leagues, that’s probably the most excited that I’ve been,” said Betts, who added an RBI single in the seventh and increased his batting average to .352.

Happ (10-6) started strong for Toronto, striking out six and holding Boston to two hits before running into trouble and some misfortune in the fourth. The Red Sox capitalized on a missed fly ball and a video review that erased what would have been the second out while scoring five runs — all unearned — before the inning ended.

“You’re not going to see many innings like that. I don’t think I could even describe it,” Blue Jays manager John Gibbons said.

Happ threw 46 pitches in the inning, 13 to Betts as he fouled off a string of five straight and caught a break when a popup bounced out of first baseman Justin Smoak’s glove after he ran it down in foul territory and attempted an over-the-shoulder catch. Betts worked Happ to a full count, then cleared the bases with his 23rd homer of the season and fourth career grand slam.

Happ loaded the bases with a walk to No. 9 hitter Jackie Bradley Jr., who was batting .202. Happ also threw a wild pitch while walking Bradley in an inning that was extended when Boston successfully challenged a force at second on a fielder’s choice.

“I felt good tonight and I felt like my stuff was sharp,” Happ said. “I don’t know if they got a ball out of the infield before that homer, so that’s tough to take.”

David Price (10-6) struck out eight over 6 2/3 innings for Boston, and Craig Kimbrel earned his 29th save.

Teoscar Hernandez hit a two-run homer in the first and Kendrys Morales had a solo homer for Toronto, which has lost four of five.

After Hernandez’s two-run homer soared deep into the center-field seats, Price didn’t allow another run until Morales led off the seventh with another shot to center that pulled the Blue Jays to 5-3.

Smoak hit an RBI double on a drive to center in the eighth, when a fan in the front row interfered with the ball and Randal Grichuk scored to pull the Blue Jays to 6-4.