Updated

J.J. Hardy clubbed the go-ahead two-run homer in the seventh inning, while Adam Jones hit a three-run shot and drove in four, as Baltimore used a late burst of offense to overcome San Francisco, 10-2, in the rubber match of a three-game series.

Matt Wieters, Nate McLouth, Nick Markakis and Brian Roberts knocked in a run apiece for the Orioles, who took Sunday's finale with 10 runs in the final four innings and have won four of their last five overall.

"I'll tell you, if I'd had known how they were going to turn out, I'd enjoy them a lot more," O's manager Buck Showalter said of the easy win.

Troy Patton (2-0) tossed a scoreless bottom of the seventh for the win. Bud Norris worked the first six, and gave up two runs on six hits.

Brandon Belt and Hunter Pence each posted an RBI double for the Giants, losers in six of their last nine.

"It got a little ugly there, no question. The bullpen just couldn't hold it there to give us a chance," Giants manager Bruce Bochy said.

Matt Cain (7-8) breezed through the first five scoreless innings, but was lifted after seven having allowed five hits and three runs with five strikeouts.

San Francisco led 2-1 in the seventh, but Cain allowed a leadoff double to Chris Davis before retiring Wieters on a fly out. Hardy then lofted his key homer to left which provided a 3-2 edge for the O's.

Baltimore broke it open in the following frame, taking a 7-2 advantage thanks to RBI singles from Markakis and Wieters, a run-scoring double by Jones and a Roberts sacrifice fly.

In the ninth, Barry Zito was victimized by Jones for a three-run blast. Manny Machado and Markakis both reached on one-out singles before Jones' 24th homer of the season.

The Giants gave Cain an early cushion, picking up two runs in their first at- bat thanks to RBI doubles from Belt and Pence.

Cain allowed one hit through five, but Roberts began the sixth with a triple and scored two batters later on a McLouth base hit.

Game Notes

Norris had won his previous two starts since being acquired from Houston on July 31 ... With a win on Sunday, the Giants could have earned just their second home series victory since the All-Star break and first since taking two of three from Arizona from July 19-21 ... The defending World Series champions fell to 4-10 vs. the American League in 2013.