DENVER (AP) – Trevor Brown hit a pair of two-run homers, Jeff Samardzija tossed eight solid innings to get his first win for San Francisco and the Giants beat the Colorado Rockies 7-2 on Tuesday night.

Hunter Pence also hit a two-run home run to help San Francisco win for the fourth time in the last five games.

Brown, starting at catcher in place of banged-up Buster Posey, hit a two-run homer off starter Tyler Chatwood (1-1) in the sixth and another off reliever Jason Gurka in the eighth.

It was Brown’s first multihomer game of his career, and his four RBIs were also a career high. His only other home run this season broke up a no-hit bid in the eighth inning against Chris Hatcher of the Los Angeles Dodgers on Friday.

Samardzija (1-0), who signed a $90 million, five-year contract in the offseason, tamed hitter-friendly Coors Field by scattering eight hits and striking out five.

He retired the next nine batters before leaving after throwing 111 pitches. Samardzija also got his first hit, a double, after Brown’s first home run.

He was locked in a pitcher’s duel with Chatwood until Pence broke a 1-all tie with his two-run homer in the fifth, his second of the season.

The Rockies got one back in the bottom of the inning when Brandon Crawford and Angel Pagan let Arenado’s blooper fall between them in the outfield, but Pagan threw out Carlos Gonzalez at home to keep the Giants ahead 3-2.

Pagan kept the sixth alive when he beat out a throw to first to avoid an inning-ending double play, and Brown followed with his first home run.

Pagan reached again in the eighth off Gurka and stole second before Brown drilled another fastball into the left-field seats.WEEK TO REMEMBER

Rockies rookie shortstop Trevor Story capped a historic start by winning NL Player of the Week honors. Story earned the award when he became the first major league player to hit seven home runs in the first six games of his career. He entered Monday leading the majors in homers and RBIs (12), but he is trying to keep his torrid start in perspective.

“If I told you I expected to hit seven home runs, I would be lying to you,” he said. “I really can’t say that I thought it would be like this.”

Samardzija helped ground Story by fanning the rookie three times on cut fastballs. Story finished 0 for 4.TRAINER’S ROOM

Giants: C Posey was given the night off because of bruise on his right instep. Posey was hurt on a foul tip by the Dodgers’ Chase Utley on Sunday. Posey was available to pinch hit and is expected to be back in the lineup on Wednesday.

Rockies: RHP Jon Gray threw 64 pitches in a rehab start for Double-A Modesto on Sunday. Gray, who is recovering from a strained abdomen, is scheduled for another rehab start on Friday, when he will increase his pitch count to 85.UP NEXT

Giants: RHP Jake Peavy (0-0, 7.20 ERA) makes his 23rd career start against the Rockies. He is 7-7 with a 3.90 ERA lifetime against Colorado.

Rockies: RHP Jordan Lyles (0-1, 13.50) was roughed up for five runs and seven hits in 3 1/3 innings against San Diego in Colorado’s home opener on Friday.