BOSTON — R.A. Dickey ended his drought against Boston and Edwin Encarnacion and Devon Travis hit two-run homers as the Toronto Blue Jays won their fourth straight game, a 5-2 decision over the Red Sox on Friday night.

Boston’s Xander Bogaerts, representing the tying run, came up with two out and two on in the ninth inning and struck out against Roberto Osuna on a 3-2 pitch after being ahead 3-0 — ending the game and his 26-game hitting streak. Bogaerts was robbed of a hit on a nifty play by shortstop Darwin Barney in the first inning and had two walks and a strikeout. He swung at ball four with David Ortiz on deck.

Dickey, 4-0 in five starts against the Red Sox in 2014, had been 0-5 with a 5.19 ERA in nine starts since, opened with five hitless innings and allowed two hits and an unearned run in 6 2/3, sending the Red Sox to their third straight loss.

The win was also the first in four starts and only the second since his first turn of the season for Dickey (3-6). He walked five, struck out four and hit a batter with the only run scoring on a passed ball.

Three relievers finished up the Jays’ 11th win in their last 14 games. The Red Sox scored a run off Joe Biagini in the eighth but Osuna got the last four outs for his 13th save in 14 chances. Osuna has thrown 17 straight scoreless innings.

Encarnacion crushed a two-run homer off loser David Price (7-2), who lost for the first time in five starts since teammate Dustin Pedroia picked up a flaw in his delivery.

Throwing a season-high 114 pitches and walking a season-high four in seven innings, Price fell to 17-3 lifetime against the Jays, the team he helped into the playoffs after arriving from Detroit last summer.

Travis, out until May 25 because of a shoulder surgery, ended an 11-pitch at-bat with a hefty two-run homer off Koji Uehara in the eighth for his first of the season.

Ortiz doubled off Dickey for the first Boston hit leading off the sixth and doubled in the eighth — his 500th and 501st doubles in a Red Sox uniform.

The two homers were the eighth and ninth yielded by the Red Sox over their last two games as they dropped into a virtual tie with the Baltimore Orioles for first place in the American League East. Boston led the Orioles by three games before losing the last two in Baltimore.

Price, who allowed eight earned runs in his previous four starts. found himself behind 2-0 one out into the game. Josh Donaldson drew a one-out walk and Encarnacion, 10-for-44 with three homers lifetime against Price coming him, clobbered one to dead-center for his 11th home run of the season.

Dickey allowed a run without a hit in the bottom of the inning, Josh Thole’s passed ball delivering Mookie Betts from third with the unearned run — and the Jays got an unearned run of their own in the fourth. A throwing error by third baseman Travis Shaw led to Toronto’s third run scoring on a double play grounder.

Two strikeouts in the fifth and Dickey was at 82 pitches with a no-hitter through five.

NOTES: Red Sox CF Jackie Bradley Jr. was activated from the paternity list after missing four games for the birth of his first child. LF Rusney Castillo sent back to Pawtucket to make room on the roster. While inactive, Bradley was named the American League Player of the month for May. … Toronto RHP Marcus Stroman, who beat the Red Sox his last time out despite allowing 11 hits and seven earned runs in 5 1/3 innings, faces RHP Steven Wright in Saturday’s second game of the series. Both pitchers have won their last two starts. Entering play Friday night, Wright had recorded all three of Boston’s complete games this season. … Toronto manager John Gibbons hinted his club will stick with its eight-man bullpen until SS Troy Tulowitzki (quad) returns from the disabled list next week. … Friday night was Pride Night at Fenway Park.

Orioles 6, Yankees 5

BALTIMORE — Hyun Soo Kim picked up another three hits, including a key single in the seventh inning that helped the Baltimore Orioles rally past the New York Yankees 6-5 on Friday night.

Orioles slugger Chris Davis hit his 11th home run of the season and first since May 20 — a towering shot onto the flag court behind right field.

Adam Jones led off the seventh with a single against New York reliever Dellin Betances (2-3) and moved to third when Kim lined a ball into the middle of the outfield. Manny Machado then gave the Orioles the go-ahead run with a fielder’s choice.

Orioles reliever Mychal Givens (5-0) picked up the win by throwing 1 1/3 scoreless innings. Closer Zach Britton posted his 16th save of the season.

Carlos Beltran, Alex Rodriguez and Austin Romine homered for the Yankees, who have lost four of their past five games.

The Orioles’ Chris Tillman fell short of tying a career-high seventh straight win.

A RBI single by Chase Headley gave the Yankees a 5-2 lead and ended Tillman’s night with two outs in the sixth. The right-hander allowed five runs and eight hits with five strikeouts and two walks.

Tillman held opponents to one home run in his first eight starts but has given up eight in his past four outings.

A two-run by double by Matt Wieters off Yankees starter Nathan Eovaldi cut the margin to 5-4 in the seventh. Kirby Yates entered and allowed a game-tying double to Jonathan Schoop.

The tying run ended Eovaldi’s career-high streak of wins in five consecutive starts. He allowed five runs and eight hits with five strikeouts in 5 1/3 innings.

The Orioles took a 1-0 lead in the second when Mark Trumbo led off with a double and scored on a single by Pedro Alvarez.

Rob Refsnyder, who had two hits and an RBI on Thursday against Detroit, took over first base for the Yankees in the third when Mark Teixeira had to leave the game because of discomfort in his right knee.

New York took a 3-1 lead an inning later when Brett Gardner drew a walk, setting the table for the back-to-back home runs by Beltran and Rodriguez off Tillman.

Gardner snapped an 0-for-24 skid with a single in his first at-bat.

Davis pulled the Orioles to within 3-2 with his 100th career home run at Camden Yards — third all time behind Rafael Palmeiro (124) and Adam Jones (110).

Romine, however, answered for Yankees when he led off the fifth with a home run to left.

Indians 6, Royals 1

CLEVELAND — Danny Salazar pitched eight innings, allowing one run on three hits, and rookie Tyler Naquin hit his first major league home run as the Cleveland Indians beat the Kansas City Royals 6-1 Friday night at Progressive Field.

Yan Gomes also homered for the second-place Indians, who have won the first two games of the four-game series to move to within 1/2 game of the first-place Royals in the AL Central.

Salazar (6-3) gave up one run on three hits with nine strikeouts and five walks.

With the Indians leading 4-1, the left-handed hitting Naquin, the Indians’ first-round pick in the 2012 June Draft, hit a 3-1 pitch from Royals starter Edinson Volquez (5-5) over the left-field wall for his first major league home run.

Naquin’s homer gave the Indians a 5-1 lead and that was plenty for Salazar, who held the Royals in check for most of the night.

Volquez was removed from the game later in the seventh inning. In 6 1/3 innings, he gave up five runs on seven hits with five strikeouts and four walks.

Salazar gave up a solo home run to Drew Butera in the third inning, then held Kansas City scoreless over his last five innings. The only other Royals hits besides Butera’s home run were a single by Alcides Escobar in the sixth inning and a single by Cheslor Cuthbert in the seventh.

The Indians scored their final run in the eighth inning when Jose Ramirez doubled off Chien-Ming Wang, stole third and scored on a throwing error by catcher Butera.

Cleveland scored first, on a solo home run by Yan Gomes with two outs in the second inning off Volquez, giving the Indians a 1-0 lead.

The Royals got that run back in the top of the third on Butera’s second home run of the season off Salazar. Butera has homered in each of the first two games of the series.

In eight career starts vs. Cleveland coming into the game, Volquez had a record of 2-5 and an 8.31 ERA. The Indians added to that ERA with a three-run, four-hit third inning that was helped along by two wild pitches.

Volquez retired the first batter of the inning, but the Indians then strung together four consecutive hits. Jason Kipnis started it by driving a double into the gap in left-center field. Kipnis went to third on a wild pitch and he scored on a single to center by Francisco Lindor, giving the Indians a 2-1 lead.

Mike Napoli followed with a double off the wall in left field, scoring Lindor to make it 3-1. Napoli advanced to third on a single by Jose Ramirez, and Napoli scored on Volquez’s second wild pitch of the inning, extending the Indians’ lead to 4-1.

NOTES: The Indians have played 53 games, which means OF Abraham Almonte has 27 more games left in his 80-game suspension for a positive test in spring training for performance-enhancing drugs. … Indians 1B Mike Napoli, who ranks in the top 10 in the American League in home runs (12) and RBIs (39), has 30 RBIs at Progressive Field, the third-most home RBIs in the majors behind Boston’s Mookie Betts and David Ortiz (30 each). … Royals C Salvador Perez, who hasn’t played since suffering a quad contusion on May 28, will likely start a game during the weekend series in Cleveland, manager Ned Yost said. … Royals relievers entered Friday’s game having not allowed a home run in their last 99 innings dating to May 4 when Washington’s Bryce Harper homered off RHP Dillon Gee.