SAN FRANCISCO -- Visiting teams don't spend much time gazing at the San Francisco Giants' 2012 championship banner swaying in the wind beyond the right field wall at AT&T Park, but maybe they should.
After all, when the flag is pointing toward Oakland and is stiff enough that it's writing can be easily read, defenders are forewarned to start backpedaling.
Young Colorado Rockies second baseman DJ LeMahieu didn't get going in reverse quickly enough Sunday, misplaying a pop fly that opened the door for an all-unearned, three-run fifth inning, and the Giants rallied for a 7-3 win in a duel of teams that began the day tied for the lead in the National League West.
Brandon Belt and Andres Torres blasted back-to-back doubles that provided the difference in a win that capped a 4-2 homestand and allowed the Giants to remain deadlocked with the Arizona Diamondbacks atop the NL West.
The Rockies, having lost two of three in San Francisco, are now a game back in third.
"There are no easy popups here," said LeMahieu, who just recently was promoted to the starting second base position. "I haven't played in all the stadiums. This is about as tough as I've seen."
Matt Cain (4-2) survived a wild first two innings -- and Michael Cuddyer's two-run double in the first -- to win for the fourth consecutive time in May after having gone winless in April. He also beat the Rockies two starts ago in Colorado despite allowing six early runs.
In pitching the Giants to their 15th come-from-behind win of the year, Cain allowed only one hit after Cuddyer's first-inning shot. However, five walks in the first two innings quickly ran his pitch count into triple figures, and he was pulled after five innings. He struck out six.
The Giants were able to overcome Cain's early troubles. The Rockies couldn't do the same after LeMahieu's miscue.
With two outs in the fifth and Marco Scutaro on first, Hunter Pence skied a popup in the general vicinity of LeMahieu, who initially seemed to have trouble with the sun, then fell victim to a San Francisco breeze that blew the ball toward right field. LeMahieu lunged back at the last moment but couldn't as much as get a glove on the ball. It was nonetheless ruled an error, the Rockies' first of the series.
"I saw some other people catching fly balls. I knew it wasn't going to stay straight," LeMahieu said. "I tried to keep my feet moving, but I misjudged it completely."
Two batters later, a 2-2 game had become 5-2, with Belt driving in Scutaro and Pence with a shot over Dexter Fowler's head in center field, and Torres plating Belt with a drive down the right field line.
"You've got to take advantage of mistakes at this level," said Belt, who also walked and scored the run that tied the game at 2 in the fourth inning. "I think Hunter creates breaks like that."
Now a veteran of the right side of the infield at AT&T Park, Belt could relate to LeMahieu's issues.
"It's pretty tough on a normal day here, but today was extra windy," Belt said. "It's tough to stay with it."
Rockies starter Jon Garland (3-6) gave up five runs (two earned) in five innings. He was touched for seven hits and walked four while striking out two.
Pence's two-out, two-run bloop double off reliever Edgmer Escalona in the sixth inning gave the Giants bullpen a five-run cushion.
Pinch hitter Jordan Pacheco's RBI single off the fourth Giants reliever, Sandy Rosario, capped the scoring in the eighth inning. But befitting their tough day, the Rockies stranded two runners in the inning, their 10th and 11th of the game.
"I felt we had Cain in trouble early," Rockies manager Walt Weiss said. "To his credit, like he did at our place, he bent but didn't break.
"He's one of the best. That's why."
Cain was so shaky early on, the Giants had Chad Gaudin warming up in the bullpen in the second inning. That appeared to wake up the veteran starter.
Cain threw 26 pitches to the first four Rockies batters, walking three of them on full counts. Then when he grooved his first pitch to the next hitter, Cuddyer jumped on it and blasted a two-run double over Torres' head in left field.
The Rockies stranded runners on second and third, however, and did so again in the second inning after Cain's fourth and fifth walks of the first 10 batters. Colorado didn't get another hit off the San Francisco ace until Fowler's leadoff double in the fifth.
Meanwhile, the Giants drew even by the end of the fourth inning, getting a solo home run from Buster Posey in the second and a run-scoring fielder's choice from Brandon Crawford in the fourth.
Posey's homer was his seventh of the season and extended his hitting streak to 10 games.
Cuddyer left the game in the sixth inning after being hit on the right forearm by a pitch from Giants reliever George Kontos. X-rays were negative, but Cuddyer was still in a lot of pain after the game and is questionable for Monday's series opener in Houston.
NOTES: There were 19 baserunners stranded in the game, 13 in scoring position. ... Colorado had been 22-6 when it scored first before blowing early leads Saturday and Sunday. ... The Giants announced before the game RHP Santiago Casilla will have surgery next week to have a cyst removed from the tibia below his right knee. Presuming there are no complications in the procedure, Casilla is expected to miss about a month. ... CF Angel Pagan, hero of the Giants' 6-5, 10-inning win Saturday with a dramatic, inside-the-park home run, felt discomfort in his left hamstring overnight and was kept out of Sunday's game. ... The Giants might have suffered a second casualty in the aftermath of Pagan's home run when RHP Tim Lincecum sprained his left ankle in the celebration behind home plate. The injury is not considered serious, and at this point his status for Wednesday's start against the Oakland A's hasn't changed. ... A "rivalry" is born Monday when the Rockies play their newly designated American League West rival, the Houston Astros. ... While the Rockies are playing four consecutive games -- two on the road, then two at home -- against the Astros, the Giants will be squaring off with their rival, the Oakland A's. Their four-game sequence begins with two in Oakland, then shifts to San Francisco for a pair.