BALTIMORE — The Baltimore Orioles have put the New York Yankees in a precarious situation.

Kevin Gausman outpitched CC Sabathia for the second time in seven days, Adam Jones homered and the Orioles got their third straight shutout against New York, 2-0 on Saturday night.

Baltimore will seek to complete a three-game sweep on Sunday. The Orioles won 8-0 on Friday night and also beat the Yankees 5-0 in Gausman’s previous start.

Time is running out for New York in its bid to snag an AL wild-card spot. If the Yankees don’t start hitting right now, they can start thinking about 2017.

“You don’t ever want to go through this during the course of the season,” manager Joe Girardi said. “So (Sunday’s) game is probably the most important game of the year.”

Gausman (7-10) allowed two hits and two walks over six innings to win his fourth straight start. He struck out eight and permitted only one runner past second base.

The right-hander threw seven shutout innings in New York last Sunday and is 2-1 with an 0.80 ERA in five starts against the Yankees this season.

“Just trying to mx in all my pitches and keep them off balance,” Gausman said. “I think a lot of their guys are obviously looking for a fastball against me, so if I can throw my offspeed pitches for strikes and kind of put that thought in the back of their minds, I can have success.”

Zach Britton, the third Baltimore reliever, worked a perfect ninth for his 40th save in 40 opportunities.

The victory moved the third-place Orioles within two games of the top spot in the AL East.

Sabathia (8-12) gave up two runs, one earned, in six innings. All it got him was another loss against the Orioles, the third in a row since mid-July.

“I didn’t have much,” Sabathia acknowledged. “Just trying to make pitches when I had to, and I was able to do that for the most part. But it was a struggle today.”

The Yankees came to town with a season-high four straight series wins, but they will leave with their ninth consecutive series loss in Baltimore.

“It’s tough, especially when CC goes out there and pitches his butt off,” right fielder Aaron Judge said. “If we win tomorrow, we forget about today.”

Gausman struck out six of the first eight batters and experienced only one difficult inning, the fourth. New York loaded the bases with one out before Starlin Castro struck out and Brian McCann hit a fly ball to left.

A double and an error by Judge provided Baltimore with an unearned run in the bottom half, and Jones hit his 25th home run in the fifth.

The suddenly punchless New York offense had no answer. The Yankees totaled 27 runs against Baltimore over two games last weekend before Gausman stepped to the mound.

FAREWELL TO TEX

Maryland native Mark Teixeira will play his final game at Camden Yards on Sunday.

Teixeira was cheered as a visiting player in Baltimore until he signed as a free agent with New York in 2009. From that point, the hometown kid heard only boos.

“When you play a long time, it really doesn’t bother you at all,” Teixeira said.

Besides, it’s not like he spurned the Orioles in 2009. “They didn’t have any intention of signing me. They made an offer just to say they made an offer,” he said.

ROSTER MOVES

Orioles: LHP Kyle Lobstein cleared waivers and was outrighted to Triple-A Norfolk.

TRAINERS ROOM

Yankees: RHP Chad Green (2-4, 4.73) has a sprained elbow and is likely done for the season. Green will see a doctor in New York on Monday.

Orioles: RHP Chris Tillman (right shoulder) will have a bullpen session Sunday after throwing three times from flat ground during the week. Tillman (15-5, 3.76) last pitched on Aug. 20.

UP NEXT

Yankees: RHP Michael Pineda (6-11, 5.12) starts the series finale Sunday. He’s winless in his last four starts.

Orioles: LHP Wade Miley (8-11, 5.43) returns to the mound coming off his longest start (seven innings, three earned runs) since joining Baltimore at the trade deadline.