CHICAGO — Just about an hour after learning his team’s playoff hopes were over, Boston Red Sox Manager Terry Francona watched as his bullpen blew a late-inning lead.

Paul Konerko tied the game in the eighth inning with a run-scoring double and Dayan Viciedo won it with a pinch-hit RBI single in the ninth as the Chicago White Sox rallied for a 5-4 victory Tuesday night.

Boston’s slim playoff hopes were dashed about an hour before the game ended. Tampa Bays beat Baltimore 5-0 and New York defeated Toronto 6-1 to secure playoff berths and eliminate the Red Sox.

“It’s disappointing. No fun going home before you want to regardless of what’s happening (injuries),” Francona said.

A season with mounting injuries means the Red Sox won’t be playing in the postseason for the first time since 2006.

“Watching the games on TV is going to feel weird,” said David Ortiz, who has played in the playoffs six of the last eight years.

Chris Sale (2-1) pitched two scoreless innings for the win for the White Sox, who snapped a seven-game home losing streak.

Juan Pierre singled with one out in the ninth off Michael Bowden (0-1). Pierre stole second and third off reliever Michael Bowden, who then walked pinch-hitter Mark Teahen. Viciedo ended the game with a single off Matt Fox just past a diving Daniel Nava in left.

The White Sox have won five of their last six games as they hope to close the season on a strong note.

“It’s real important. You never want to go in the offseason with too much of a sour taste. It’s going to be sour just because we’re going to be watching in October, but we can end on a good note and carry it over to spring training and get ready for next year,” Pierre said.

With Chicago trailing 4-3 in the eighth, Manny Ramirez led off the inning with a walk. Brent Lillibridge came in as a pinch runner and stole second. Konerko doubled to right off Daniel Bard to make it 4-4. Bard ended the inning by striking out Andruw Jones with runners on first and third.

Ortiz homered for the Red Sox and John Lackey pitched six strong innings.

The Red Sox contended with season-ending injuries to Dustin Pedroia and Kevin Youkilis.

“With all that’s happened, for us to be able to stay in it as long as we did this season shows something about the character of this team,” Lackey said.

J.D. Drew homered and Adrian Beltre had two hits for Boston, which lost for the second time in six games.

Lackey allowed two runs, three hits and a walk while striking out five.

“I pitched all right but if I don’t go seven-plus innings, I don’t feel it’s a total success,” Lackey said.

Carlos Quentin homered for the White Sox.

White Sox Manager Ozzie Guillen has been impressed with Sale, who was drafted this season.

“Since Sale has been up in the big leagues, he has been unbelievable. He is opening a lot of people’s eyes. He is locked,” said Guillen.

White Sox starter Edwin Jackson gave up four runs, three earned, struck out six and walked one.

Jackson allowed consecutive doubles in the second. Beltre led off the inning with a double down the left-field line and scored on Jed Lowrie’s double.

Drew homered with one out in the third, his 21st.