Updated

Eric Sogard scored the game-winning run in the 10th inning to lift the Oakland Athletics to a 9-8 win over Baltimore that avoided a four-game sweep by the Orioles at The Coliseum.

Sogard singled, then moved to third on Adam Rosales' sacrifice bunt. Rosales bunted the ball right back to reliever Pedro Strop (0-1) for what appeared to be a tailor-made double play, but Strop threw the ball into center field.

With runners now on second and third, Coco Crisp pushed a bunt down the third- base line. Orioles third baseman Manny Machado fielded the ball cleanly, but his throw sailed into left field to allow Sogard to score.

The A's trailed 8-6 with one out in the ninth, but Yoenis Cespedes clobbered a two-run homer into the second deck in left field to tie the game. Cespedes was activated from the 15-day disabled list earlier on Sunday.

Cespedes finished the game 2-for-5 with two runs scored. Seth Smith hit a two- run homer and drove in three and Josh Donaldson added a two-run double for the A's, who had dropped eight of their last nine games.

"We just needed to win," A's manager Bob Melvin said. "We needed to fight, and we needed to claw back and do something good and win a game more than anything."

Jerry Blevins (1-0) earned the win after tossing a perfect 10th inning. Starter Bartolo Colon was tagged for five run on nine hits over six innings.

Chris Davis finished 2-for-4 with homer and three RBI, Manny Machado went 4- for-5 and drove in two runs and Davis finished 2-for-4 with three RBI. Adam Jones added two hits and a pair of RBI for the Orioles, who had won 103 straight games when leading after the seventh inning entering the game. Nate McLouth went 4-for-5 with four runs scored in the setback.

"I think we have to be happy with the way we swung the bats (in the series)," Davis said. "Obviously the last game, they battled back and Cespedes hit a ridiculous home run."

Baltimore got things started with a four-run fourth inning. With the bases loaded, Jones singled to right field to score McLouth. Davis followed with a two-run double, and Matt Wieters added a sacrifice fly to give the O's a 4-0 edge.

Jones' RBI double in the fifth pushed the Baltimore spread to 5-0, but the A's plated four runs in the sixth pull within a run.

Coco Crisp scored Rosales with a base hit to center before scoring on a Smith ground out. After Cespedes singled and Brandon Moss walked to load the bases, Donaldson roped a two-run double to left field.

Machado's RBI base hit made it 6-4, but Smith tied the game with a two-run blast in the home half.

Davis' ninth homer of the season put the O's on top in the eighth, before Cespedes tied the game with one out in the bottom of the ninth.

Game Notes

Oakland is 14-12 in April with two games remaining. The A's have finished the month of April with a winning record just once over the previous nine years (16-11 in 2008) ... Davis has 28 homers this season ... Baltimore's last loss when leading after seven inning was Aug. 8, 2011 ... Orioles starter Miguel Gonzalez gave up four runs on seven hits over 5 1/3 innings.