NEW YORK (AP) Jacoby Ellsbury hit a tiebreaking homer to snap out of a slump and CC Sabathia pitched six gritty innings after leaving his previous outing with dehydration, leading the New York Yankees to a 2-1 victory over the Boston Red Sox on Thursday night.

Alex Rodriguez had an RBI double and Justin Wilson (4-0) struck out three batters in the seventh to help the Yankees take two of three from the last-place Red Sox.

The AL East leaders next face a pair of Cy Young Award winners, R.A. Dickey and Toronto newcomer David Price, when they play the streaking Blue Jays in a key weekend series. The division rivals, separated by 4 1/2 games, play the first of 13 remaining games against one another Friday night.

More from FoxSports

Dellin Betances gave up a hit in the eighth. Andrew Miller put two on with two outs in the ninth, but struck out Rusney Castillo to remain perfect in 24 save chances.

Ellsbury connected with two outs in the seventh off 22-year-old Eduardo Rodriguez (6-4), who beat the Yankees once this year.

The former Red Sox center fielder was in a 3-for-23 slump entering Thursday. His average had dipped from .322, when he came off the disabled list on July 8, to .277 coming in.

Sabathia left his previous start wilted by the Texas heat. He was ornery in this outing, yelling at plate umpire Rob Drake over a called ball early on and giving a fist-pumping shimmy after striking out David Ortiz with the bases loaded to end the fifth.

The big left-hander had just walked Xander Bogaerts following Castillo's run-scoring single that ticked off the glove of diving shortstop Didi Gregorius to tie it 1-all. Castillo's hit came right after Sabathia walked .100 hitter Jackie Bradley Jr.

Eduardo Rodriguez intentionally walked Alex Rodriguez to load the bases in the bottom half, but Mark Teixeira and Chris Young popped out.

Pitching on an extra day of rest, Sabathia stalked around the mound and used pinpoint control to strike out eight. He yielded three hits and three walks after allowing five runs in each of his previous two starts.

TRAINER'S ROOM

Red Sox: At his request, OF Mookie Betts saw concussion specialist Dr. Michael Collins in Pittsburgh. ''As far as I know, reports were good,'' general manager Ben Cherington said. Betts is expected to join the Red Sox in Detroit this weekend, but there is still no target date for his return. ... Cherington said top prospect Brian Johnson, a first-round draft pick in 2012, has inflammation around his pitching elbow but there is ''no evidence that there is anything going on around the ligament.''

Yankees: Brian McCann (stiff knee) was out of the starting lineup for a second straight night, but manager Joe Girardi said the catcher could've played. He said McCann is day to day and it shouldn't be a long absence.

UP NEXT

Red Sox: Joe Kelly (3-6) starts the series opener against Detroit. The right-hander has allowed at least four runs in each of his last four starts.

Yankees: Nathan Eovaldi (11-2) makes his first start against Toronto's potent offense. New York faces a second knuckleballer this week in Dickey (6-10) after being held to a run in eight innings by Boston RHP Steven Wright on Wednesday.