Updated

Chris Davis hit a two-out, two-run double in the 10th inning and the Baltimore Orioles beat the San Francisco Giants 5-2 Friday night.

J.J. Hardy homered and Adam Jones had two hits and drove in a run for Baltimore. Matt Wieters also drove in a run.

Jim Johnson (3-7) gave up a game-tying hit to Hunter Pence with no outs in the ninth and then worked out of the jam to gain the victory.

Orioles starter Chris Tillman threw eight stellar innings, striking out a career-high nine, giving up one run on four hits and walked one.

Brandon Belt had two hits, including a home run, for the Giants, who have lost five of seven. Javier Lopez (1-2) allowed all three runs in the 10th to take the loss.

Tillman was on his way to becoming the first Orioles pitcher to win eight road games in a season before Johnson blew his first save since July 1.

Ryan Vogelsong, who was reinstated from the 60-day disabled list before the game, allowed two runs on six hits over six innings. He walked three and struck out four.

Tommy Hunter got the final three outs for his third save in four chances.

Manny Machado recorded his 41st double of the season with one out in the first. Jones singled him home to put the Orioles ahead, 1-0.

Hardy led off the second with his 20th homer, giving Baltimore a 2-0 lead.

Vogelsoing, in his first appearance since May 20, settled in afterward. After allowing six hits in the first three innings, he retired 10 of the final 12 batters he faced.

Belt hit his 13th home run of the season and second in as many days, a solo shot, with two outs, to the deepest part of the park.

Tillman retired 16 in a row after walking Pablo Sandoval in the second. He struck out the side in the second and the first two batters he faced in the third.

Machado doubled off Brandon Crawford's glove with one out in the 10th. After getting Nick Markakis on a comebacker, the left-handed Lopez walked Jones intentionally and got ahead of Davis 1-2 before giving up the two-run double. Wieters followed with an RBI single.

NOTES: The Giants hit home runs in successive home games for the first time since May 25-29, a three-game stretch. ... RHP Jean Machi was optioned to Triple-A Fresno to make room for Vogelsong, who was reinstated from ther 60-day DL. ... Giants RHP Guillermo Moscoso will pitch out of the bullpen with Vogelsong back in the rotation. ... Giants IF Tony Abreu (left knee bursitis) will begin a rehab assignment with Triple-A Fresno on Sunday. ... The Elias Sports Bureau reported RHP Tim Lincecum became the first Major Leaguer since Johnny Vander Meer threw back-to-back no-hitters in 1938 to surrender one hit and pitch more than six innings in his first win after throwing a no-hitter. ... Orioles IF Chris Davis became the first hitter with 40 or more home runs to appear in AT&T Park since Arizona's Mark Reynolds on Sept. 21, 2009. Before that it was Barry Bonds in 2004. ... Hardy became the third O's SS to record three consecutive seasons of 20 or more HRs, joining Miguel Tejada and Cal Ripken, Jr. ... O's RHP Jason Hammel (right flexor mass tightness) received a cortisone shot from Dr. James Andrews.