Anthony Santander hit a game-ending, two-run home run with two outs in the bottom of the ninth inning to propel the Baltimore Orioles past the San Francisco Giants 5-3 on Thursday afternoon. Santander fouled off four consecutive two-strike pitches from Ryan Walker before connecting for his 42nd homer of the year. Gunnar Henderson, who singled earlier in the inning, also scored.

Jackson Holliday hit a two-run single and Zach Eflin pitched six strong innings to help the Orioles snap a three-game losing streak. Holliday had gone nine games without driving in a run until his fourth-inning hit and had only one RBI in September. The Orioles (85-68) won for only the third time in their last 11 games.

They moved within four games of the first-place New York Yankees in the American League East race after the Yankees lost to Seattle later in the day. Adley Rutschman had a run-scoring double, while Ryan O'Hearn and Henderson each had two of Baltimore's 10 hits. Trying to protect a 3-2 lead in the top of the ninth, Baltimore closer Seranthony Dominguez walked Patrick Bailey and Heliot Ramos to lead off the inning.

Casey Schmitt hit a drive to right-center, with Baltimore outfielders Cedric Mullins and Austin Slater colliding on the play. Brett Wisely, who pinch-ran for Bailey, scored the tying run. Mullins and Slater stayed in the game.

Gregory Soto (3-5) took over for Dominguez and got the final two outs of the frame. Michael Conforto homered for the second day in a row for the Giants (.