Updated

When told he'd connected for what is believed to be the longest home run of his career, Chris Davis expressed surprise while immediately noting it hardly mattered in the big picture.

The slugger also grounded out to end the game Saturday against San Francisco closer Sergio Romo, and the Baltimore Orioles lost 3-2 to the Giants despite getting Davis' majors-leading 42nd homer.

Davis' drive high into the seats in right-center pulled the Orioles within a run on a day of missed chances in multiple innings.

"Really? Wow. Not quite enough," Davis 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.

The homer by Davis was one of the fastest and fiercest to clear the fences that anyone can remember at AT&T Park.

"That's as quick as I've seen a ball leave the ballpark. That was out in a hurry," Giants manager Bruce Bochy said. "You give up a home run like that it can rattle anybody. That ball was crushed."

Romo found himself staring at the home run leader only an inning later with the tying run at first.

Only a night earlier, Davis hit a two-out, two-run double in the 10th inning of a 5-2 win.

Romo retired Davis on a game-ending groundout, and solid pitching wasn't wasted this time as the Giants held on after Hunter Pence's go-ahead, two-run double in the sixth inning.

"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."

But San Francisco's stagnant lineup finally got to Wei-Yin Chen on Saturday — and then Romo kept Davis down in the final inning.

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 they stranded a runner at third. Baltimore 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. We had some good situations. We just didn't cash the ticket," Showalter said. "We were fortunate. We had a lot of borderline pitches with Gaudin go our way early ... but you still want to cash in on them over the course of the game."

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.

"They watched me for five innings already and they're patient. They kept waiting and waiting for my fastball," Chen said. "It is a little hard for me to adjust to the umpire's strike zone. For the first through fifth inning, I felt like I kept the ball down but in the sixth inning I felt like everything was up."

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.

He 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."

NOTES: Orioles RHP Jason Hammel, who received a cortisone shot Friday for right forearm tightness, believes he soon will 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."... 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.