SAN FRANCISCO (AP) -- In the eighth inning Saturday, Chris Davis connected for one of the fastest, fiercest home runs to clear the fences that anyone can remember at AT&T Park.
San Francisco closer Sergio Romo then found himself staring at the majors' home run leader an inning later with the tying run at first.
Romo retired Davis on a game-ending groundout, and solid pitching wasn't wasted this time as the Giants held on for a 3-2 win against the Baltimore Orioles after Hunter Pence's go-ahead, two-run double in the sixth inning Saturday.
''That's what this game is all about: the best in the world versus the best in the world,'' Pence said of the Romo-Davis matchup. ''He's having a really remarkable season and he's definitely locked in. That was an exciting at-bat. Romo got the job done, which was really crucial for us.''
San Francisco's stagnant lineup finally got to Wei-Yin Chen on Saturday - and Romo then kept Davis down in the final inning following his 42nd home run leading off the eighth against Santiago Casilla.
The drive high into the seats in right-center was thought to be one of the farthest in Davis' career.
''Really? Wow. Not quite enough,'' he said. ''Any time you have runners on, especially with our lineup, you expect somebody to come through with a big hit, but their pitchers made pitches and they made plays.''
Nick Markakis added three hits, but Baltimore had its three-game winning streak snapped on a day of missed opportunities.
Guillermo Moscoso (1-0) pitched two scoreless innings of relief for the win.
The Orioles left the bases loaded in the second. Adam Jones hit a sacrifice fly in the third, but Baltimore stranded a runner at third. The Orioles squandered chances again in the sixth, eighth and ninth.
Baltimore manager Buck Showalter was unhappy with the strike zone - for both sides.
''I thought (Chad Gaudin) deserved a little better fate, too,'' Showalter said. ''We had some good situations. We just didn't cash the ticket.''
After Brandon Belt singled with two outs in the first, Chen (6-5) retired the next 13 batters before Andres Torres' leadoff single in the sixth. He was sacrificed to second and Marco Scutaro followed with a tying single. Belt doubled one out later and Buster Posey drew an intentional walk, bringing up Pence.
''It's nice to get a hit when you've got the opportunity in a big situation. It's nice to get a ball to fall,'' Pence said.
That's been a tough chore in so many close games this season.
Belt, who has retooled his swing several times the past two seasons, had two hits. He homered in each of his previous two games.
''We got the hit we've been looking for,'' manager Bruce Bochy said. ''It's the type of hit that wins ballgames for you and has been missing. It's good to get those timely hits. You hope guys relax a little bit and start having more fun.''
Gaudin struck out six in five innings for the Giants, working out of several jams. Casilla struck out Ryan Flaherty and pinch-hitter Matt Wieters with two runners on to end the eighth.
Romo earned his 27th save in 31 chances as the Giants won at AT&T Park for only the third time in their last 10 home games. They dropped the series opener in 10 innings Friday.
Romo didn't back down from Davis.
''I trust my stuff. Everybody here believes in my ability to get hitters out,'' Romo said. ''It's just a win that we needed, and I just happened to be able to get him out to end it.''
Posey, the reigning NL MVP and batting champion, started and caught in a day game after a night game - not often his routine. Manager Bruce Bochy said the off-day Monday factored into the decision, as well as a recent day to rest.
NOTES: Orioles RHP Jason Hammel, who received a cortisone shot Friday for right forearm tightness, believes he will soon be ready to pitch again, though he isn't going to come off the disabled list Tuesday when eligible. Dr. James Andrews evaluated Hammel's MRI and agreed with the team's conclusion to do the injection. ... The Giants lead the clubs' all-time series 6-5. ... Showalter on J.J. Hardy's 20 home runs in three straight seasons: ''I didn't realize how good he was, just because I didn't know him.'' ... The Giants improved to 16-22 vs. lefty starters. ... Baltimore is 13-7 against all California teams this year. ... RHP Matt Cain pitches the series finale Sunday for San Francisco against RHP Bud Norris.