BOSTON — Steven Wright and the slumping Boston Red Sox looked like a long shot Thursday night against Chris Sale and the surging Chicago White Sox.

Then Wright’s knuckleball came alive, Sale had his worst start since April, and Chicago’s seven-game winning streak came to a surprising end.

Wright pitched seven effective innings and David Ortiz went 3 for 3 with two RBI, leading Boston to an 8-2 victory.

“It was nice. Our guys did an unbelievable job because I didn’t realize how hard (Sale) threw,” said Wright, who had lost his previous two starts since being called up from the minors. “Our guys put together good at-bats.”

Xander Bogaerts also had three hits in Boston’s third win in 15 games, and Rusney Castillo homered in the seventh. Brock Holt had a two-run single.

Jose Abreu hit a two-run homer in the first for the White Sox, who head home for a weekend series against the Yankees after a 7-1 trip moved them into contention for an AL wild card.

The first five batters reached in Boston’s four-run sixth before Sale (9-6) was lifted. He allowed seven runs and 12 hits.

“We’ve been playing great and we’ve got 24 guys in here that didn’t deserve tonight,” Sale said. “I should have been better for them. At least we know the reason why we lost this game.”

Signs pointed to the White Sox completing their first unbeaten trip of eight or more games since 1951 and reaching .500 for the first time since early May.

Sale had a sparkling 0.89 ERA in seven appearances against AL-worst Boston. Wright had struggled, and the Red Sox were uncompetitive in losing the first three games of the series.

But Sale struggled with location, and Wright (4-4) struck out a career-high eight after a suspect start.

“He didn’t have a good feel for it the first couple innings,” Boston Manager John Farrell said. “Once he did get the feel for it, the consistency, the violence to the action and the strike-throwing ability improved across the board. It slowed them down.”

The White Sox, who had four-, five- and two-run first innings in the first three games of the series, added two when Abreu sent a 1-1 pitch into the Red Sox bullpen for his 17th homer.

But unlike much of the past week, the Red Sox rallied in a game delayed 51 minutes at the start due to rain.

Ortiz, who entered hitting .162 against left-handers, pulled a 98 mph fastball to right for an RBI double in the first. Hanley Ramirez and Ortiz added two-out RBI singles in the fifth to put Boston ahead 3-2. Holt chased Sale with his hit in the sixth.

The Red Sox snapped a three-game losing streak but not without another weird injury involving slumping Pablo Sandoval.

The third baseman, who left Wednesday’s game with dehydration, was lost to a bruised left forearm after he was plunked while striking out on Sale’s inside fastball to end the fourth.

“He’s sore right now,” Farrell said. “That was a fastball that chased him. It looked like it might have hit him in the throat if he didn’t take it in the wrist on the swing. A scary moment. The scan here at the ballpark is clean but he’s still day to day.”

NOTES: Outfielder Mookie Betts (concussion) was “slightly improved” but still experiencing headaches Thursday, Farrell said.