Updated

Oakland, CA (SportsNetwork.com) - A David Ortiz solo homer in the top of the 10th inning saved the Red Sox from a worse fate, as the visitors claimed a 7-6 victory over Oakland in Sunday's finale of a four-game series.

"I like to go out there and make things happen," Ortiz said. "We've had a good game, had a good series and then we go back to struggles. So hopefully everything changes at some point."

Mike Napoli and David Ross also went deep, while Jonny Gomes collected three hits and drove in two for the Red Sox, who had lost each of the first three contests in the set and appeared to be heading for an easy victory thanks to 7 2/3 strong innings from starter Jon Lester.

But Yoenis Cespedes, Josh Donaldson and Derek Norris rapped consecutive RBI singles in the eighth, then Stephen Vogt and pinch-hitter John Jaso hit solo homers in the ninth off Koji Uehara (3-1) to send the game to extras.

Ortiz greeted Fernando Abad (2-3) with a shot just to the left of center to begin the 10th, and Uehara recovered thanks to a 1-2-3 home half.

"That's as hard as we fought all year in what looked like a game we weren't in for a little while," Athletics manager Bob Melvin said. "A testament to the fight these guys have. They really never feel like they're going to lose a game until the last out is made."

Alberto Callaspo posted an RBI double for the Athletics, whose win streak came to an end at five. Tommy Milone worked five frames, allowing eight hits and five runs in the no-decision.

Two singles and a walk loaded the bases in the Boston first, then Gomes plated a pair on a two-out hit.

Ross began the second with his third homer of the season and the Sox led 3-0, but Callaspo doubled home Norris to give the A's their first run in the home half.

Napoli singled with one down in the third, went to second on a Gomes hit, then third on Jonathan Herrera's fielder's choice grounder. He scored when Herrera appeared to be caught trying to leave early in an attempt to swipe second, but dodged a tag at the plate.

Napoli reached the seats in right with two down in the fifth and Boston took a 5-1 lead, and in the eighth, Gomes kept the inning alive with a two-out single and scored when Herrera followed with a triple.

Oakland chased Lester in the bottom of the eighth, after Craig Gentry was plunked with two down, stole second and Jed Lowrie drew a walk. Burke Badenhop entered, but Gentry swiped third ahead of three straight run scoring hits -- from Cespedes, Donaldson and Norris -- to make it 6-4.

Andrew Miller put an end to the rally with a liner off the bat of Coco Crisp.

Vogt's one-out homer to right off Uehara closed the gap to 6-5, and after Nick Punto popped out, Jaso slammed a ball deep into the right-field seats to tie the game.

"As a catcher, I know pinch hitters come in real jumpy, so you start 'em off slow and they'll go chasing after stuff," Jaso said. "I was sitting offspeed and I think he yanked a fastball into my red zone, I just kind of reacted on it."

Game Notes

Prior to Sunday, the Red Sox had dropped five straight road games in Oakland. They are just 2-11 on the East Bay since the start of 2012 ... A's first baseman Kyle Blanks left the game and did not return due to a left calf strain, while Norris departed in the top of the 10th with an apparent head injury after taking yet another glancing blow from a bat's follow-through ... The last Red Sox player to hit a homer and steal home in the same game was Rico Petrocelli on Sept. 9, 1967 vs. the Yankees ... Uehara had converted 31 straight save opportunities.