NEW YORK -- The previous three nights can be best described as long and strange for the New York Yankees.

On Thursday, the Yankees were more than pleased to have a normal afternoon that turned into another win.

Brandon McCarthy pitched six innings and the Yankees concluded a bizarre four-game series with a 4-2 victory over the Texas Rangers.

Switch-hitting third baseman Chase Headley had an RBI single, and catcher Francisco Cervelli and first baseman Brian McCann added RBI doubles. Left fielder Brett Gardner lifted a sacrifice fly for the Yankees (53-48), who are 6-1 during a 10-game homestand and have 12 wins in their last 18 games.

The latest win came after the teams spent nearly 12 hours in the previous games deciding outcomes.

The Yankees opened the series by making five errors in a nine-inning game for the first time since 1998. They then picked up a 14-inning win on Headley's RBI single Tuesday in a five-hour game on the day that he arrived in the second inning after a trade from San Diego. On Wednesday, New York won a rain-shortened 4 1/3-inning game that was decided after a nearly two-hour delay that saw the grounds crew struggle to get the tarp on the field.

"It was nice just to play a normal game," Headley said. "I actually came in and felt in like I was going through my normal routine and it felt like a normal day at the ballpark, which we hadn't had yet."

Yankees manager Joe Girardi said, "The days were strange. This series really started off strange with five errors and then to win the next two and then to come out today, to win the game was nice."

McCarthy continued helping New York's depleted rotation have some normalcy by allowing one run and five hits in six innings. His outing marked the 10th straight time Yankees pitchers have allowed four runs or less, and it was the 10th time in 12 games that a New York starter allowed two earned runs or less.

He did so on a day when his stuff was not sharp at times, resulting in many long at-bats. Texas fouled off 33 pitches and had 12 at-bats that lasted at least five pitches. But McCarthy struck out five, walked two, threw 74 of 109 pitches for strikes and got five ground-ball outs plus a double play.

"At least from where I felt today, it was good that I stayed with Cervy (Cervelli), kind of grind through it and got the results that I needed," McCarthy said. "There's always improvements that I can make, but to get out of it and get a win, that's a good thing."

Girardi said, "They put some long at-bats on him. They fouled off a lot of pitches, but he just kept at it. He kept throwing strikes and with his sinker, his cutter and his breaking ball. He just found a way to get through it."

Shortstop Elvis Andrus had an RBI single and first baseman J.P. Arencibia homered for Texas, which has lost 17 of 20. Rookie second baseman Rougned Odor had two hits, but RF Alex Rios and third baseman Adrian Beltre went hitless in a combined eight at-bats.

"We're keeping ourselves in ballgames," Rangers manager Ron Washington said. "We just have to take advantage of the opportunities."

Texas right-hander Colby Lewis (6-8) allowed three runs and four hits in 6 1/3 innings and lost his third straight start.

McCarthy allowed a run with two on and two outs in the third inning. Andrus hit a popup into shallow center field that second baseman Brian Roberts went back to get, but the ball fell in and Odor scored.

McCarthy finished his third outing as a Yankee by retiring 10 of the last 12 hitters, including a strikeout of Andrus with the score tied 1-1 with two on for the final out of the fifth. Then the Yankees went ahead on Cervelli's double to left and took a 3-1 lead on Gardner's sacrifice fly to left field.

Adam Warren allowed the home run to Arencibia but got two fly balls before Matt Thornton secured the final out of the seventh. Dellin Betances worked a perfect eighth and David Robertson put the tying run on first with one out in the ninth but protected the two-run lead with two strikeouts for his 25th save.

NOTES: Yankees 1B Mark Teixeira missed his fourth straight game with a lat strain and his 25th game of the season. The Yankees will decide whether they need to place him on the disabled list before Friday's game with the Toronto Blue Jays. ... SS Derek Jeter had the day off from New York's starting lineup but would have started a night game. ... After trading RHP Joakim Soria to the Detroit Tigers on Wednesday, the Rangers called up RHP Nate Adcock from Triple-A Round Rock. ... The Rangers said RHP Nick Tepesch will not make the start Friday. RHP Jerome Williams was signed after the game and will get that start. ... Texas pitching coach Mike Maddux will miss this weekend's series with Oakland to attend the Hall of Fame induction ceremonies for his brother Greg Maddux. Bullpen coach Andy Hawkins will serve as the pitching coach and Round Rock pitching coach Brad Holman will fill in for Hawkins.