Castillo hit a tiebreaking two-run single in Chicago’s four-run eighth, helping the White Sox beat the Texas Rangers 4-2 on Thursday night in the opener of a four-game series between two of the worst teams in the AL.

Chicago improved the majors’ worst record to 11-29 in the worst 40-game start in franchise history. It was the first home win for the White Sox since May 3 and just the fourth in 19 games at Guaranteed Rate Field this season.

”We haven’t been playing good baseball, so we got to pick it up,” said James Shields, who pitched three-hit ball into the eighth inning. ”We still got a long season to go.”

Texas (17-28) wasted a terrific start by Doug Fister, who stepped in for Cole Hamels and pitched seven sparkling innings. Shin-Soo Choo had two hits, drove in a run and scored.

Hamels was scratched after he woke up Wednesday with a stiff neck, prompting Banister to move Fister up a day to pitch on regular rest. The veteran right-hander showed no signs of any trouble with the change, surrendering six hits.

”It’s a constant battle. I’m still trying to fine-tune certain things,” Fister said. ”Tonight we were able to throw a curveball and a changeup really well in certain counts and certain locations, and I think that made a huge difference.”

Yoan Moncada sparked the winning rally with a ground-rule double after Jose Leclerc (1-1) retired the first two batters of the inning. Moncada advanced on a passed ball and scored when Leclerc committed a throwing error on Yolmer Sanchez’s tapper back to the mound.

The White Sox then used three consecutive walks to tie it at 2 before Rangers manager Jeff Banister pulled Leclerc in favor of Kevin Jepsen. One of the walks was intentional, but there were some close calls along the way and Banister was thrown out by plate umpire Paul Nauert after he made the pitching change.

”I’m gonna fight for my guy,” Banister said. ”I’m gonna fight for what I thought was right. I still feel the same way.”

Castillo greeted Jepsen with a single that dropped in front of a diving DeShields in center, driving in Jose Abreu and Nicky Delmonico.

Moncada finished with three hits for Chicago, which had lost nine of 10.

Luis Avilan (1-0) got two outs for the win and Nate Jones worked the ninth for his second save. The Rangers put runners on second and third with one out, but Ronald Guzman grounded out and DeShields struck out to end the game.

Shields set season highs with eight strikeouts and 7 1/3 innings for Chicago, but remains winless in nine appearances since he beat Kansas City on opening day on March 29. The right-hander allowed one run and walked three.

”Just tried to keep the team in the game as long as I possibly could,” Shields said.

FAMILY AFFAIR

Diamond DeShields, the first-round pick for the WNBA’s Chicago Sky out of Tennessee, threw out a ceremonial first pitch. DeShields’ brother is Delino DeShields.

TRAINER’S ROOM

Rangers: SS Elvis Andrus played catch for the first time since he broke his right elbow last month. He also ran and took ground balls. ”It was a test to see if I feel any vibration,” Andrus said. ”I’m really glad I didn’t feel anything. Everything feels good.” Andrus said he could be cleared to swing next week.

White Sox: RHP Miguel Gonzalez (rotator cuff inflammation) got a PRP injection this week. ”As a result he’s no-throwing right now for 10 to 14 days and then we’ll reassess,” general manager Rick Hahn said. … LHP Carlos Rodon (arthroscopic left shoulder surgery) is scheduled to pitch Saturday for Class A Kannapolis in his first rehab start with an affiliate. Hahn said he will work about five innings. … OF Avisail Garcia (strained right hamstring) did some fielding drills in the outfield before the game, but Hahn said he still feels the injury and the team plans to go slowly with him.

UP NEXT

White Sox right-hander Carson Fulmer (2-3, 6.23 ERA) pitches Friday for the first time since he lasted just 1 2/3 innings in an 11-2 loss to the Cubs a week ago. Left-hander Matt Moore (1-5, 7.82 ERA) moves up a day to pitch for the Rangers on regular rest.