The Yankees' Ben Rice, center, celebrates toward his dugout after...

The Yankees' Ben Rice, center, celebrates toward his dugout after hitting a single during the second inning of a game against the Baltimore Orioles on Sunday in Baltimore. Credit: AP/Peter Casey

BALTIMORE — First, Cam Schlittler delivered.

Next, the bullpen.

Finally, in the 10th inning, the Yankees’ offense showed up, Ben Rice first and foremost.

Rice hit a grand slam with none out in a six-run 10th as the Yankees earned a 7-1 victory over the Orioles on Sunday afternoon in front of 31,974 at Camden Yards.

It sounded as if the vast majority were Yankees fans when the lefthanded-hitting Rice obliterated a fastball from lefthander Keegan Akin for his 24th homer. The 413-foot drive to right-center left his bat at 110.3 mph and gave him his fourth hit and his fifth RBI of the afternoon.

“Just trying to get the guy from third in,” said Rice, who showed a bit of emotion rounding first. “Hitting the go-ahead homer’s always fun, so I was excited, the team was excited. We’re late in the season here and every game’s so important.”

Jazz Chisholm Jr.’s 31st homer and Anthony Volpe’s RBI single made it 7-1.

Rice also had a two-out RBI single to left in the sixth off righthander Kyle Bradish that tied it at 1-1.

The victory, the 26th in their last 38 games, put the Yankees (88-68), 20 games over .500 for the first time this season. They took three of four from the Orioles (73-83) to keep their slim AL East title hopes alive.

With the Blue Jays ending their four-game losing streak with a victory in Kansas City, the Yankees may well run out of time. They trail by two games, but because Toronto owns the tiebreaker, they would need to gain three games with six to play.

The Yankees have six home games against the White Sox and Orioles and the Blue Jays will host six games against the Red Sox and Rays.

“It’s huge,” Rice said of taking the division. “Every game’s going to be more important than the last one, so we just have to stay on top of it and keep our foot on the gas.”

The Yankees have the second-best record in the American League and a magic number of four to clinch the first wild card.

Trent Grisham started the 10th on second as the ghost runner against righty Kade Strowd, who had struck out the side in the ninth, and Aaron Judge walked. In came Akin to face the lefty-swinging Cody Bellinger — slashing .346/.398/.574 with runners in scoring position and .351/.400/.608 vs. lefthanded pitching — and he singled to left. That set up Rice, who hit the club’s ninth grand slam of the season for a 5-1 lead.

“Benny’s going to do what he always does,” Schlittler said. “Bases loaded, good matchup there, it’s a fastball. Exactly what I expect out of him.”

Before the 10th, it had been a frustrating day at the plate for the Yankees, who ended the ninth 2-for-7 with RISP and nine runners left on base.

Schlittler bounced back big time from his previous outing Tuesday in Minneapolis, when he struggled to command his fastball, which regularly sits in the range of 98 to 99 mph.

Schlittler, who had a season-high five walks as his lack of control paved the way for the Twins to nearly complete a comeback from nine runs down, had no such issues Sunday, striking out six and walking one in 5 1⁄3 innings.

He allowed one run, a home run by Samuel Basallo in the fifth, and three hits in lowering his season ERA to 3.27 in 13 starts. He is competing with Luis Gil to be the third starter in a best-of-three Wild Card Series.

“Definitely felt a lot better than last week,” Schlittler, who struck out the side in the first and two more in the second, said of his fastball command.

Said Aaron Boone: “Big outing by him.”

Bradish also was terrific, allowing one run, two hits and two walks in six innings in which he struck out nine.

The Yankees’ bullpen was outstanding, with Tim Hill, Fernando Cruz, Luke Weaver, Devin Williams and David Bednar combining to allow no runs, one hit and three walks after Schlittler’s departure. Camilo Doval did load the bases with two outs in the bottom of the 10th but struck out Ryan Mountcastle to end it.

Williams stood out, striking out the side in the eighth.

“Hopefully [we] can continue to stack these,” Boone said of the bullpen’s collective performance. “They all were really good today ... Look, every win’s precious and every day it feels like there’s so much on the line. But once it’s over with, you’ve got to move on. It’s great this way heading into an off day.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME