SAN FRANCISCO  You look at the standings. Then, just for a reality check, you look at the calendar.

Still, you can’t help it. You almost have to look back at the standings, a disbelief double-check.

After a couple of years in which the National League West Division rankings might as well have been written in hieroglyphics -- for all they meant to the way-behind Padres -- the order of teams suddenly has become a pretty good read for the long-down club that began Tuesday night’s game at AT&T Park in second place.

Despite solo home runs by Nick Hundley and Logan Forsythe off Giants ace Matt Cain and a go-ahead, two-run blast in the eighth by Jesus Guzman, though, the Padres had their seven-game winning streak snapped with a wild 5-4 loss to the San Francisco Giants. The Giants scored two decisive runs in the eighth off Padres reliever Dale Thayer, the RBIs coming on Brandon Belt's double and Juan Perez' two-out single through the right side.

"The teams we've been playing played, like the Giants, can take the wind out of your sails," said third baseman Chase Headley of the streak's end, "but we've done a good job of weathering the storm."

True, it's mid-June, not yet the first day of summer. But also consider that when the Padres' winning streak began, they were six games behind the division-leading Arizona Diamondbacks. A win Tuesday would have pushed them into sole possession of second place. Heady stuff, really, given the Padres' relative irrelevance to past races.

“It’s maybe a small reward to be able to look up and see we’re right in the thick of things,” said Headley. “When you see yourself 10 games out of first place or whatever, like we were a few weeks ago, then see where we are now, that’s encouraging, for sure.

“But there’s such a long ways to go, so many games to be played, it’s not even worth getting caught up in it. We’re not going to be scoreboard –watching. But it’s nice reminder that we are playing good baseball.”

They've been playing remarkably good baseball while losing key players left and right. Padres manager Bud Black said it's likely that shortstop Everth Cabrera, who's missed the last two games with a hamstring strain, will be the latest starter added to the 15-day disabled list.

"It's tough, but it's probably good," said Cabrera. "We'll shut it down so it gets better and I can get back to playing."

The Padres were even with the Giants when Cain departed after six innings. San Francisco went ahead 3-2 on Gregor Blanco's RBI single up the middle on the 107th and last pitch thrown by Padres starter Andrew Cashner. but Giants reliever Jeremy Affeldt walked Forsythe to open the eighth and Guzman parked a fastball over the wall in center.

You had to go all the way back to the game’s first hitter to find any sign that the Padres might escape another of their arduous evenings against Cain, who had posted six straight quality starts and a 1.74 earned-run average versus San Diego.