DENVER (AP) -- Brandon Crawford kept up his May hitting surge by lining a pair of singles, Gorkys Hernandez had a diving catch in center field to thwart a rally, and the San Francisco Giants avoided being swept with a 7-4 win over the Colorado Rockies on Wednesday night.
Crawford was 2 for 5 with an RBI. He's hitting .412 this month, raising his season average from .189 to .307.
Derek Holland (3-6) settled down after giving up a three-run homer to Nolan Arenado in the first. The left-hander allowed four runs in five innings to help the Giants snap a three-game skid.
The Giants' bullpen allowed three hits the rest of the way, with Hunter Strickland getting Arenado to pop up to end the game and earn his 11th save.
Between four strikeouts, Evan Longoria delivered a run-scoring triple in the fifth off reliever Harrison Musgrave (0-1) that staked the Giants to a 5-4 lead. Over the three-game series, Longoria also had two homers and two doubles.
Hernandez hauled in the catch of the night in the fifth with two on and two out. He dove to snare a sinking liner by Carlos Gonzalez, who tossed his batting helmet in frustration.
Jon Gray turned in his shortest outing of the season at 3 1/3 innings. He walked two straight batters with the bases loaded in the fourth to allow the Giants tie the score at 4. Musgrave entered and the Rockies got out of the tight spot when Andrew McCutchen's liner was dropped by Trevor Story, who then began a double play.
Pablo Sandoval started at second base a day after Kelby Tomlinson committed three errors. Sandoval had an RBI single in the second.
Tomlinson entered the game in the fifth.
Giants: RHP Jeff Samardzija was placed on the 10-day disabled list with shoulder tightness. ... INF Joe Panik (left thumb) could return to the Giants on Friday. ... RHP Mark Melancon (elbow) will be evaluated Thursday.
Rockies: 2B DJ LeMahieu (left thumb) took multiple at-bats in Arizona on Wednesday. "He's doing really well. He's close," manager Bud Black said. Possibly activated Friday? "You can speculate. I'm not going to tell you. But you can speculate it a lot," Black said.
Before the game, 8-year-old Hailey Dawson of Las Vegas delivered a ceremonial underhand pitch to Chad Bettis while wearing a Rockies-themed prosthetic hand. She has Poland syndrome, which stunted the growth of the fingers on her right hand.
It was her ninth stadium visit in her quest to throw in every major league park. Her next stop is Seattle.
She's also delivered pitches at Baltimore, Washington, San Diego, San Francisco, Chicago Cubs, Texas, Cleveland, and during Game 4 of the 2017 World Series in Houston. Several Rockies players signed her prosthetic hand, including Ian Desmond, Arenado and Gonzalez.
Giants: The Giants head home for six games after going 2-6 on their trip. RHP Chris Stratton (6-3, 4.97 ERA) starts Friday in a three-game set against Philadelphia.
Rockies: After a day off, LHP Tyler Anderson (4-1, 4.72 ERA) takes the ball Friday to open a three-game series against the Dodgers and LHP Alex Wood (1-4, 3.75).