BALTIMORE >> Beau Brieske pitched out of a jam in the ninth inning, Riley Greene drove in the go-ahead run in the 10th and the Detroit Tigers inched closer in the AL wild-card chase by beating the Baltimore Orioles 6-4 on Saturday.

Detroit moved within a half-game of the Twins for the final American League playoff spot. Minnesota’s game at Boston was rained out and rescheduled as part of a doubleheader today.

The surging Tigers have won 10 of 13 to put themselves in surprise postseason contention after being under .500 a month ago.

This one almost slipped away when closer Jason Foley allowed consecutive singles, a walk and a double to Gunnar Henderson that tied the score at 4 in the ninth. Detroit manager A.J. Hinch pulled Foley for Brieske (3-4), who induced a groundout, got help with an impressive catch from shortstop Trey Sweeney in shallow left field and ended the threat with a flyout to center.

That clutch performance, followed by singles from Greene and Jace Jung and a sacrifice fly from Zach McKinstry off reliever Yennier Cano (4-3), quieted the Camden Yards crowd of nearly 40,000 that was ready to celebrate minutes earlier. Brieske got out of another jam in the 10th to seal it.

Baltimore could have clinched a second consecutive trip to the postseason with a win and a Seattle loss later Saturday. Instead, that will have to wait until at least today, and time is running out to catch the New York Yankees atop the AL East.

• Tigers: Rookie INF Colt Keith, who had a sacrifice fly in the eighth, did not start because of a banged-up right shoulder but could play the entire game in the field today, Hinch said.

• Orioles: CF Cedric Mullins was in the lineup after being out Friday because of neck tightness from a collision with Austin Slater in the outfield on Thursday. ... Baltimore manager Brandon Hyde said 1B Ryan Mountcastle (wrist) and 3Bs Jordan Westburg (hand) and Ramon Urias (ankle) are “getting close” to returning.

RHP Albert Suárez (8-6, 3.60 ERA) is set to pitch for the Orioles in the series finale. The Tigers had not announced a starter, though RHP Casey Mize (2-6, 4.36) would be on full rest.