CHICAGO — Right fielder Rusney Castillo went 3-for-4 with a career-high five RBIs to lead the Boston Red Sox to a 5-4 win against the Chicago White Sox on Monday night.

Castillo singled, doubled and homered to extend his hitting streak to nine games. Boston (57-68) earned its fifth win in the past seven games.

Chicago (58-65) lost its second consecutive game after winning the previous three.

Boston right-hander Joe Kelly (7-6) picked up the victory after limiting White Sox hitters to two runs on five hits in 7 1/3 innings. Kelly has won each of his past five starts.

A miserable month continued for White Sox right-hander Jeff Samardzija (8-10), who allowed five runs on eight hits in 5 2/3 innings. Samardzija dropped to 0-5 with a 9.00 ERA in August.

Boston right-hander Jean Machi collected his second save despite allowing two runs in the ninth.

Castillo increased Boston’s lead to 5-1 in the sixth with a two-run double off the right-field wall. He was thrown out trying to advance to third base.

Chicago cut the deficit to 5-2 in the sixth when left fielder Melky Cabrera drove in center fielder Adam Eaton.

The White Sox added two more runs in the ninth inning to slice the deficit to 5-4. Right fielder Avisail Garcia and shortstop Alexei Ramirez each drove in a run before second baseman Carlos Sanchez popped out in foul territory to end the game.

The White Sox took a 1-0 lead in the first inning on an opposite-field home run by first baseman Jose Abreu. Kelly elevated a breaking pitch on the outside corner, and Abreu lofted the ball down the right field line for his 24th home run of the season and the third in his past nine games.

Boston made it 3-1 in the second inning on a three-run home run by Castillo. After left fielder Hanley Ramirez and second baseman Brock Holt reached base with two outs, Castillo belted a slider by Samardzija to straightaway center field for his fifth home run.

Boston third baseman Pablo Sandoval flashed a defensive highlight when he tumbled over the tarp and into the stands to catch a foul ball by Chicago first baseman Adam LaRoche in the second. LaRoche shook his head and returned to the dugout after the 5-foot-11, 255-pound Sandoval sprinted for the acrobatic catch.

NOTES: Boston interim manager Torey Lovullo said RHP Junichi Tazawa would remain in the closer’s role despite allowing four runs during a blown save Sunday against the Kansas City Royals. It was the fifth time he blew a lead in his past nine appearances. “We want to be consistent with what’s happening every day, and Taz is our closer,” Lovullo said. … Chicago RHP Zach Putnam was unavailable out of the bullpen for a second consecutive game because of a sore groin. … Boston RF Rusney Castillo could play some left field before the end of the season, Lovullo said. … Chicago C Tyler Flowers was RHP Jeff Samardzija’s batterymate for the second time in a row and the third time this season. … Boston 2B Dustin Pedroia, sidelined since July 23 because of a right hamstring strain, made the trip to Chicago and is projected to return to the lineup Sept. 10.