MINNEAPOLIS (AP) CC Sabathia has pitched this season as if he turned back time about five years.

He's been the best hope for the New York Yankees to climb back into contention.

Didi Gregorius hit a tiebreaking three-run homer in the seventh inning, Sabathia had another strong start and the Yankees stopped a four-game losing streak with a 4-1 victory over the Minnesota Twins on Thursday night.

More from FoxSports

Sabathia (5-4) needed 116 pitches to complete six innings, struggling with his fastball command, but he struck out seven and retired the last five batters he faced.

''I've got some experience being able to calm down and be able to make a pitch when I need to,'' said Sabathia, who lowered his ERA to 2.20. His career best is 2.70, in the 2008 season split between Cleveland and Milwaukee.

Former Yankees shortstop Eduardo Nunez's two-out RBI single in the fourth gave the Twins the lead, ending the scoreless streak for Sabathia at 15 innings. But the burly 35-year-old struck out Robbie Grossman to strand two of the nine runners the Twins left on base against him, justifying manager Joe Girardi's decision to send him out for the sixth after Sabathia lobbied for it.

''Baserunners are going to happen,'' Girardi said. ''It's the pitches that you make when baserunners are on that are the most important.''

Aroldis Chapman pitched the ninth for his 12th save in 13 attempts after scoreless innings by Dellin Betances and Andrew Miller.

Fernando Abad relieved Twins starter Kyle Gibson (0-5) with one out in the seventh to face the left-handed Gregorius, after an infield single and a walk to start the inning. Abad, who had yet to allow a homer all season and took a 0.79 ERA into the game, threw a first-pitch fastball to Gregorius that landed in the seats in right field.

''It's a dangerous part of the game when you're potentially facing their bullpen here with a lead in the last three innings,'' Twins manager Paul Molitor said. ''We just couldn't make a pitch to try to keep the game even.''

Sabathia hasn't given up more than three runs in any of his 11 turns. Nor has he surrendered more than two runs in any appearance since April. Over the previous three seasons, spanning 69 starts, Sabathia had a 4.81 ERA.

Gibson faced the minimum 15 batters through five innings, but the first four Yankees reached to start the sixth, with Jacoby Ellsbury's RBI single tying the game. Carlos Beltran grounded into a double play to end that inning, but more trouble loomed for Gibson in the seventh.

''CC has been strong all year,'' Gibson said. ''It's a tough matchup for any team. He was on tonight.''

GREGORIUS GETTING IT

Gregorius is 6 for 11 with seven RBIs in his last three games. Lefties are batting just .125 (4 for 32) against Abad, but Gregorius is hitting a team-high .368 (21 for 57) against left-handers.

''The second half of the season last year, that's when I kind of figured out everything hitting-wise,'' Gregorius said.

Gregorius batted just .247 against lefties last year, his first with the Yankees following the retirement of Derek Jeter.

''To see him relax and go out and be able to have fun playing the game, I think has made a huge difference,'' Sabathia said, raving about the 26-year-old's play.

PRAISE FOR NUNEZ

Nunez, who played parts of four seasons for the Yankees before being traded to the Twins in 2014, left plenty of admirers with his original team despite never becoming more than a part-timer. Nunez has flourished this year, entering the game sixth in the league in batting average and third in steals.

TRAINER'S ROOM

Yankees: Beltran was back in the lineup in RF after a three-day break, missing two games, because of a sore left knee. Beltran, who leads the team with 16 HRs, went 0 for 3 before being pulled as a precaution. ''He said he felt better than he thought he would,'' Girardi said.

Twins: OF/IF Danny Santana (strained left hamstring) was returned from his rehab assignment after the game to be taken off the DL, and OF Oswaldo Arcia was designated for assignment to make room.

UP NEXT

Yankees: RHP Masahiro Tanaka (3-2, 3.08 ERA) will take the mound Friday. He has allowed two earned runs or fewer in 10 of 13 starts.

Twins: RHP Pat Dean (1-2, 4.17 ERA) will pitch the second game of the four-game series, his sixth career start.