BOSTON (AP) -- The Fenway Park crowd booed when Xander Bogaerts walked on four pitches in the eighth inning, figuring it would be his last chance to extend the longest active hitting streak in baseball.
The Red Sox shortstop came up an inning later with more than his streak on the line.
With two on and two out in the ninth, Bogaerts struck out to seal Toronto's 5-2 victory on Friday night and end his hit streak at 26 games. Bogaerts, who finished 0 for 3 with two walks, worked a 3-0 count against Roberto Osuna before going down swinging to end it.
''It was a tough day to lose the streak. ... But I battled and I enjoyed every bit of it,'' Bogaerts said. ''I'm pretty disappointed but obviously it was going to end someday.''
Five days after taking a no-hitter into the sixth inning against the Red Sox in Toronto - and then allowing the next five batters to reach base - R.A. Dickey threw five more innings of hitless ball and this time the Blue Jays held on.
Dickey (3-6) didn't give up a hit until David Ortiz opened the sixth with a double. He got the next three batters on a fly ball to center, a comebacker to the mound and a strikeout.
''I just didn't want to give in tonight,'' Dickey said. ''It's a really good (lineup). You can't afford to give in. If you do, it can be a crooked number real quick.''
Dickey walked five, hit a batter and struck out four. He left after allowing Mookie Betts' ground rule double with two out in the seventh, only the second Red Sox hit.
Boston tied its longest losing streak of the season with its third consecutive defeat. The Red Sox have lost six of their last nine games.
David Price (7-2), who helped pitch Toronto into the playoffs last season and then signed with Boston, allowed two earned runs on six hits, four walks and a hit batter, striking out five in seven innings. He stayed in the game after being hit by Jose Bautista's line drive in the third.
''Scary,'' said Price. ''It didn't hurt me; it didn't affect me. It's just more scary than anything else.''
Edwin Encarnacion hit a two-run shot off Price in the first inning, and Devon Travis added a two-run homer off Koji Uehara in the eighth.
''That's what happens whenever you're behind in the count to hitters like that,'' Price said. ''It was a 2-0 fastball that wasn't located. That's what good hitters do: they put good swings on bad pitches.''
Ortiz got his 500th double with Boston for the first hit off Dickey. Ortiz is now third in team history to Carl Yastrzemski (646) and Ted Williams (525).
Ortiz added double No. 501 in the eighth after Bogaerts walked. Hanley Ramirez's groundout scored one run to make it 5-2, but Boston got no closer.
Red Sox: OF Brock Holt will travel to Pittsburgh to see a concussion specialist when the team goes to San Francisco for next week's series against the Giants. Holt was put on the concussion injury list on May 20.
RHP Steven Wright (5-4) goes for Boston on Saturday against Toronto RHP Marcus Stroman (5-1).