CC Sabathia won for just the second time since the All-Star break, Didi Gregorius and Aaron Hicks hit two-run homers as the New York Yankees built a six-run lead and beat the Baltimore Orioles 10-8 Friday night to close in on their second straight AL wild card.

Luke Voit added a two-run single to give him 24 RBIs in 31 games with the Yankees, and Hicks scored four runs. After Baltimore closed to 9-8 in the eighth, Aaron Judge doubled in a run for his first RBI since returning from the disabled list on Sept. 14.

More Images
New York Yankees' CC Sabathia delivers a pitch during the first inning of a baseball game against the Baltimore Orioles, Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

CC Sabathia won for just the second time since the All-Star break, Didi Gregorius and Aaron Hicks hit two-run homers as the New York Yankees built a six-run lead and beat the Baltimore Orioles 10-8 Friday night to close in on their second straight AL wild card.

New York Yankees' CC Sabathia delivers a pitch during the first inning of a baseball game against the Baltimore Orioles Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

Baltimore dropped to a major league-worst 44-109, overtaking the 1937 St. Louis Browns for second-most losses in franchise history behind the 111 of the 1939 Browns.

New York Yankees starting pitcher CC Sabathia reacts after two runs scored during the fifth inning of a baseball game against the Baltimore Orioles, Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

Baltimore closed to 6-4 on Adam Jones' two-run single in the fifth, Austin Wynn's homer against Jonathan Loaisiga and Jonathan Villar's RBI single against former-Oriole Zach Britton later in the seventh.

New York Yankees' Didi Gregorius celebrates as he runs the bases after hitting a home run during the first inning of a baseball game against the Baltimore Orioles, Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

New York hasn't said whether Luis Severino, Masahiro Tanaka or J.A. Happ would start the wild-card game.

New York Yankees' Aaron Hicks follows through on a two-run home run during the fourth inning of a baseball game against the Baltimore Orioles Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

BOOM!-TOWN

New York Yankees fans react as Baltimore Orioles center fielder Adam Jones (10) drops the ball hit by New York Yankees' Neil Walker for a double during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

LONG NIGHT

New York Yankees' Gleyber Torres (25) slides past Baltimore Orioles second baseman Jonathan Villar (2) to steal second base during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

"He's a big reason why we had the success we had last year," Cashman said. "We're doubling down, tripling down on Gary Sanchez because we know the ceiling that is there and the capabilities this player has on both sides of the ball."

Baltimore Orioles starting pitcher Yefry Ramirez reacts as New York Yankees' Aaron Hicks runs the bases after hitting a two-run home run during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

TRAINER'S ROOM

Baltimore Orioles starting pitcher Yefry Ramirez reacts as New York Yankees' Aaron Hicks runs the bases after hitting a two-run home run during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

RHP Lance Lynn (2-2, 4.47) starts Saturday for the Yankees and RHP David Hess (3-10, 5.22) for the Orioles.

New York lowered its magic number to two over Tampa Bay for ensuring a wild-card game on Oct. 3, most likely against Oakland. The Yankees began the night 1½ games ahead of the Athletics for home-field advantage.

New York Yankees' CC Sabathia delivers a pitch during the first inning of a baseball game against the Baltimore Orioles, Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

New York Yankees' CC Sabathia delivers a pitch during the first inning of a baseball game against the Baltimore Orioles, Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

Baltimore dropped to a major league-worst 44-109, overtaking the 1937 St. Louis Browns for second-most losses in franchise history behind the 111 of the 1939 Browns.

Backed by a 6-0 lead, Sabathia (8-7) allowed two runs in six innings and improved to 20-11 against Baltimore. The 38-year-old left-hander, making perhaps his last Yankee Stadium appearance, struck out five and raised his total to 2,981. He had been 1-4 in his prior 11 starts.

Gregorius hit his 27th homer in the first and Hicks added his 25th in a four-run fourth off rookie Yefry Ramirez (1-7), who is 0-4 in 10 starts since beating Boston on July 24. A former Yankees farmhand, Ramirez gave up six runs, six hits and three walks in 3 2/3 innings and fell to 0-3 against New York.

New York Yankees' CC Sabathia delivers a pitch during the first inning of a baseball game against the Baltimore Orioles Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

New York Yankees' CC Sabathia delivers a pitch during the first inning of a baseball game against the Baltimore Orioles Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

Baltimore closed to 6-4 on Adam Jones' two-run single in the fifth, Austin Wynn's homer against Jonathan Loaisiga and Jonathan Villar's RBI single against former-Oriole Zach Britton later in the seventh.

Voit singled off Cody Carroll in a three-run bottom half that put New York ahead 9-4, but Renato Nunez hit a two-run homer against A.J. Cole in the eighth and DJ Stewart hit a two-run homer on David Robertson's first pitch as Baltimore closed within a run. Dellin Betances pitched the ninth for his fourth save.

LOOKING AHEAD

New York Yankees starting pitcher CC Sabathia reacts after two runs scored during the fifth inning of a baseball game against the Baltimore Orioles, Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

New York Yankees starting pitcher CC Sabathia reacts after two runs scored during the fifth inning of a baseball game against the Baltimore Orioles, Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

New York hasn't said whether Luis Severino, Masahiro Tanaka or J.A. Happ would start the wild-card game.

Severino got just one out in last year's wild-card game against Minnesota, and New York overcame a three-run deficit to win 8-4. An All-Star for the second straight year, he was 14-2 at the All-Star break but lost six of his next nine decisions before beating Boston this week.

"Sevy got out of the gate extremely hot and like our team has struggled for an extended period of time here in the second half," general manager Brian Cashman said, "but I feel like he's getting back on line, just like I feel we might be getting back on line, too. And if we can do that at the perfect timing, then we are capable of a lot and we will be a more formidable opponent than we've been the last two months and more representative of what we were earlier in the year."

New York Yankees' Didi Gregorius celebrates as he runs the bases after hitting a home run during the first inning of a baseball game against the Baltimore Orioles, Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

New York Yankees' Didi Gregorius celebrates as he runs the bases after hitting a home run during the first inning of a baseball game against the Baltimore Orioles, Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

BOOM!-TOWN

Hicks became the fifth Yankee with 25 or more homers, joining Giancarlo Stanton (35), Gregorius, Judge (26) and Miguel Andujar (25).

Gleyber Torres has 23, and New York could match the mark of six set by the 2003 Boston Red Sox.

New York Yankees' Aaron Hicks follows through on a two-run home run during the fourth inning of a baseball game against the Baltimore Orioles Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

New York Yankees' Aaron Hicks follows through on a two-run home run during the fourth inning of a baseball game against the Baltimore Orioles Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

LONG NIGHT

Chris Davis struck out four times and is batting .170.

SANCHEZ

Gary Sanchez, slowed by a groin injury, is hitting .189 with 16 homers and 47 RBIs, down from .278, 30 homers and 90 RBIs last year, when he added three homers and eight RBIs in the postseason.

New York Yankees fans react as Baltimore Orioles center fielder Adam Jones (10) drops the ball hit by New York Yankees' Neil Walker for a double during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

New York Yankees fans react as Baltimore Orioles center fielder Adam Jones (10) drops the ball hit by New York Yankees' Neil Walker for a double during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

"He's a big reason why we had the success we had last year," Cashman said. "We're doubling down, tripling down on Gary Sanchez because we know the ceiling that is there and the capabilities this player has on both sides of the ball."

STONEWALL SCHOLARS

New York announced a Yankees-Stonewall Scholars Initiative in which five $10,000 scholarships will be awarded to public school seniors — one from each borough — to commemorate next June's 50th anniversary of the Stonewall riots. The scholarships will go to students who demonstrate academic achievement along with commitment to equality and support for the LGBTQ community. The Yankees had been the only MLB team not to launch an LGBTQ initiative. Team president Randy Levine said this initially was a one-time commitment but could be extended.

New York Yankees' Gleyber Torres (25) slides past Baltimore Orioles second baseman Jonathan Villar (2) to steal second base during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

New York Yankees' Gleyber Torres (25) slides past Baltimore Orioles second baseman Jonathan Villar (2) to steal second base during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

TRAINER'S ROOM

Orioles: RHP Alex Cobb, who has not pitched since Sept. 11 because of a blister on his pitching hand, is scheduled to start Sunday's series finale. ... RHP Luis Ortiz won't pitch again this year. He made his debut in relief Sept. 7 and left his first start seven days later because of an injured left hamstring. LHP Josh Rogers was sent home after three late-season appearances with the Orioles. Rogers pitched 150 1/3 innings this year and reached his limit, according to manager Buck Showalter.

UP NEXT

Baltimore Orioles starting pitcher Yefry Ramirez reacts as New York Yankees' Aaron Hicks runs the bases after hitting a two-run home run during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

Baltimore Orioles starting pitcher Yefry Ramirez reacts as New York Yankees' Aaron Hicks runs the bases after hitting a two-run home run during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

RHP Lance Lynn (2-2, 4.47) starts Saturday for the Yankees and RHP David Hess (3-10, 5.22) for the Orioles.

More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP_Sports

Baltimore Orioles starting pitcher Yefry Ramirez reacts as New York Yankees' Aaron Hicks runs the bases after hitting a two-run home run during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)

Baltimore Orioles starting pitcher Yefry Ramirez reacts as New York Yankees' Aaron Hicks runs the bases after hitting a two-run home run during the fourth inning of a baseball game Friday, Sept. 21, 2018, in New York. (AP PhotoFrank Franklin II)