TORONTO — Clay Buchholz was not going to let something like a turned ankle keep him from his first win since April 6.

The Boston Red Sox got home runs from first baseman Mike Napoli and third baseman Pablo Sandoval to help Buchholz get that win on Sunday in a 6-3 victory over the Toronto Blue Jays.

Staked to a four-run lead in the first inning, Buchholz (2-4) allowed seven hits, three walks and three runs in 6 1/3 innings to help the Red Sox salvage the finale of a three-game series after dropping the first two.

“It’s a little sore, it’ll be all right though,” Buchholz said of his ankle. “My left foot landed in the hole that I was landing on going to home plate. I had my ankles taped, fortunately, so I think that saved me from it being too bad.”

Buchholz hurt the ankle at the end of the fourth inning.

“He didn’t show any favoring of anything through his delivery so we stayed with him,” Red Sox manager John Farrell said.

Right-hander Koji Uehara pitched the ninth to pick up his sixth save of the season.

Blue Jays right-handed knuckleballer R.A. Dickey (1-4) allowed seven hits, three walks and six runs in six innings, and he picked up the loss. Toronto finished a six-game homestand with a 4-2 record.

“I’m frustrated,” Dickey said. “I’m tired of saying I’m one poor pitch away from a good outing every outing. Both the home runs came with two outs.

“The home run to Sandoval was actually a fairly good knuckleball I thought. Napoli’s was not a good one. I find myself in that place often at the first of the year where you’re saying if I could have one pitch back it would be a much better result.”

The Red Sox (14-17), who were outscored 14-1 in the first two games of the series, scored four runs in the first inning, three on the third homer of the season by Napoli.

Center fielder Mookie Betts started the rally with a triple that Toronto center fielder Kevin Pillar had in his glove after a long run to right-center, but the ball popped free when he landed on the turf.

“We almost got an unbelievable play by Pillar in the first inning.” Blue Jays manager John Gibbons said. “We get so used to seeing him make those plays. That would have been one of the all-time best.”

Second baseman Dustin Pedroia drove in Betts on a groundout to shortstop.

Left fielder Hanley Ramirez’s grounder to third forced designated hitter David Ortiz, who had walked, at second. Sandoval doubled and Napoli homered to center.

“You fall behind that much early, it’s a battle to climb back,” Gibbons said.

“I was very sad that I squashed the momentum we generated (by winning four of the first five games of the homestand),” Dickey said. “The four-run first really hurts. It’s hard to put your team in a hole like that and expect good results collectively.”

The Blue Jays (16-16) cut the lead to 4-1 in the fourth on singles by first baseman Edwin Encarnacion and left fielder Chris Colabello.

Sandoval’s third homer of the season followed a single by Ramirez in the fifth and increased the lead to 6-1.

“For us to come out and score four runs in the first maybe let our guys relax a little bit.” Farrell said. “Clay went out and kind of felt his way, somewhat, through the first inning when he had three walks but then settled into a very good rhythm. The four-run margin gave us a chance to settle in and play a solid game.”

Two-out doubles by second baseman Devon Travis and third baseman Josh Donaldson scored a run in Toronto’s fifth.

“I’ve given up four runs really quick after having a four-spot,” Buchholz said. “My goal was to go out there, especially after the first inning, and throw strikes.”