PHOENIX (AP) -- Chris Young and Paul Goldschmidt hit first-inning home runs off Tim Lincecum and the Arizona Diamondbacks opened defense of their NL West title with a 5-4 victory over the San Francisco Giants on Friday.
Ryan Roberts ' two-run double broke a sixth-inning tie as Arizona defeated Lincecum (0-1) for the fourth time in a row.
Ian Kennedy (1-0) allowed three runs on nine hits in 6 2-3 innings to beat the Giants for the fourth straight decision.
Pablo Sandoval 's RBI double with two outs in the ninth pulled the Giants within a run. But J.J. Putz got Buster Posey on a grounder to earn the save.
Melky Cabrera hit a two-run homer in his first game for San Francisco after coming over in a trade with Kansas City.
Posey, the 2010 NL Rookie of the Year, singled twice. The young star catcher also walked in his first game back after the brutal left leg injury sustained in a home plate collision last May 25 with Florida's Scott Cousins .
After having to watch the Diamondbacks celebrate their division crown when they clinched it with a victory over San Francisco last Sept. 23 at Chase Field, the Giants waited through a pregame ceremony while Arizona unveiled a big letter "A" sign designating the title.
Then the Diamondbacks got to Lincecum in a hurry.
Willie Bloomquist led off with a single and Young, who hit .400 this spring with five home runs, hit a 2-2 pitch into the left-field seats.
Lincecum struck out Justin Upton and Miguel Montero , but Goldschmidt's towering home run to left on a 3-1 pitch made it 3-0. It was Goldschmidt's third home run in 10 at bats against the two-time NL Cy Young Award winner.
San Francisco got close in the fifth when Angel Pagan led off with a double, and Cabrera's line drive to right bounced off the top of the fence in right and over for a home run.
The Giants tied it at 3 in the sixth after singles by Aubrey Huff and Brandon Belt . Ryan Theriot advanced the runners with a sacrifice bunt, and Huff scored on Brandon Crawford 's groundout.
But Arizona regained the lead its next time up. Upton doubled and advanced to third on a deep fly out by Montero. Goldschmidt walked and Jason Kubel reached when Posey couldn't handle his spinning hit in front of the plate. With the bases loaded, Roberts lined a double into the left-field corner for a 5-3 lead, ending Lincecum's evening.
Lincecum struck out five in a row in one stretch. He was 0-3 in four starts against Arizona last season.
NOTES: Young hit his second career opening day HR. The first was in 2008. ... Giants RHP Ryan Vogelsong threw three innings in a rehab start in the opener for Triple-A Fresno Thursday night, allowing no runs on three hits in four innings, striking out six and walking three. ... The Giants and Diamondbacks met in a season opener for the first time. ... San Francisco 1B prospect Angel Villalona's option to Class A San Jose was canceled because of his continuing visa problems in the Dominican Republic. The Giants say Villalona was placed on the Major League Baseball restricted list pending further developments. ... The attendance of 49,130 was the third-largest opening day crowd at Chase Field and fourth largest for any game there.