TORONTO - The Toronto Blue Jays came close but in the end they could not overcome the four home runs allowed by R.A. Dickey.

Their ninth-inning rally netted only two runs and the American League East leaders lost 5-4 to the Chicago White Sox on Friday.

Dickey (6-7) allowed only one other hit besides the home runs and also struck out a season-best nine.

"It's a terrible letdown," Dickey said. "One less home run we win that game. It's just a really bizarre outing to be able to strike out nine guys, get all those swings and misses on what I felt like was a really, really good knuckleball tonight."

Rookie first baseman Jose Abreu hit two solo homers against Dickey and Dayan Viciedo added a solo shot with Alexei Ramirez hitting a two-run blast that proved to be the difference.

The Blue Jays had three home runs. Edwin Encarnacion and Dioner Navarro hit back-to-back solos in the sixth as the Blue Jays 45-37) tied the game 2-2, and Colby Rasmus, leading off the ninth as a pinch hitter, hit his 11th of the season.

Left-hander John Danks (7-6) allowed five hits, including two home runs, and two runs over six innings, to earn the victory.

The White Sox (37-44) regained the lead in the seventh as Abreu led off with his 25th homer of the season. Ramirez followed with his eighth, a two-run drive after a walk to designated hitter Adam Dunn.

"It's a baffling pitch," Dickey said of his knuckleball. "The pitch that Abreu hit out, I threw it the same way that I threw the one that they swung and missed at. It's just part of what you have to accept with the pitch. And then hopefully you look back at the end of the year and you've kept us in games. But tonight was a tough one because we should have won that game."

White Sox manager Robin Ventura said Dickey's knuckleball looked good all night.

"Guys were coming back saying he was throwing a good one," Ventura said. "Guys like that, you never know. Sometimes you go up there and you might not have a chance and you hope he throws a flat one. That's why you never know. You go up there and you could get the good one or you could get the flat one."

The four homers allowed by Dickey were his most in a game since 2006 when he allowed six.

But the Blue Jays still had a chance. White Sox right-hander Ronald Belisario, who was trying for his ninth save, got only one out in the ninth. After the leadoff homer to Rasmus, he gave up one-out singles to Munenori Kawasaki and Anthony Gose. Left-hander Eric Surkamp came in to face pinch-hitter Adam Lind, whose grounder resulted in an error by third baseman Conor Gillaspie.

Right-hander Jake Petricka came in and Jose Reyes forced pinch runner Drew Hutchison out with a grounder to short as another run scored. Melky Cabrera ended the game with a grounder to second and Petricka picked up his second save of the season.

"Hey, we had a shot," Blue Jays manager John Gibbons said. "It would have been a nice little win, it was right there. It was one of those kinds of nights. I thought Dickey was great early on. He gave up two homers, we came back and tied it, they went back out and scored three.

"We made a run late, that's all you ask for."

Prior to the fifth inning, Dickey had allowed only one base runner, on a second-inning error by Reyes. But Abreu led off the fifth with his 24th homer of the season and Viciedo hit his seventh two outs later.

"It's not a surprise," Ventura said. "(Abreu) is a good hitter, but I think you also see the power that's there. When he gets it on the barrel, it just seems to continue to go. It's like helium balls, they just continue to float."

The Blue Jays tied the game by hitting back-to-back homers for the sixth time this season with two out in the sixth when Encarnacion hit his 25th and Navarro his fifth.

There was a four-minute delay during the top of the second while Ventura talked to the umpires about some blinking lights on the facade just below the centre-field scoreboard that started flashing after fire alarm bells were heard. The game continued and the lights stopped blinking three batters into the bottom of the second.

"It was more of an annoyance," Ventura said. "You first sit there and notice it and then you're hitting. I didn't know if they could actually just turn it off but I guess it took a while because it's the hotel and there's protocol with the fire department that I'm not in control of, so I couldn't get it turned off."

With the lights still blinking in the bottom of the second, Toronto's Steve Tolleson snapped a career-high 0-for-16 drought with a one-out double to left. A possible rally was thwarted after Kawasaki singled to right but made a big turn around first base. Kawasaki was caught in a rundown between first and second, while Tolleson, who inched too far down the third-base line, was thrown out by Ramirez.

NOTES: Attendance at Rogers Centre was 24,173. … Rasmus did not start the game. Gibbons said he had planned a day off for Rasmus, who missed 33 game with a hamstring injury and returned on June 18. … Brad Glenn, who was called up to the Blue Jays from triple-A Buffalo on Wednesday, made his major-league debut in right field on Friday. …Left-hander Chris Sale (6-1, 2.27 earned-run average) will start Saturday for the White Sox against Toronto rookie right-hander Marcus Stroman (4-2, 4.25).