PHOENIX (AP) The San Francisco Giants finally beat Zack Greinke, although that hasn't been all that unusual for anyone this season.
Johnny Cueto pitched seven strong innings for San Francisco, Greinke had another difficult outing at home for Arizona and the Giants opened a four-game series with a 4-2 victory over the Diamondbacks on Thursday night.
Joe Panik hit a two-run homer off Greinke, who fell to 1-3 in five home starts. Chris Owings had an RBI triple for Arizona.
Cueto (5-1) allowed two runs and eight hits, striking out nine and walking two in a matchup of two of the highest-priced free agent pitchers last offseason. Cueto signed a six-year, $130 million contract, which was dwarfed by Greinke's six-year, $206.5 million deal.
The pitchers easily could have wound up on opposite teams. The Diamondbacks courted Cueto and the Giants thought they were in on Greinke to the last minute.
Cueto smiled broadly when reminded of that possibility.
''Right now I belong to the Giants,'' he said.
San Francisco is 7-1 in Cueto's eight starts. He's gone at least seven innings in all but one of his outings.
''He's been so consistent and done a great job of giving us quality innings,'' Bochy said. ''He's fun to watch. He pitches out there and did a great job against a tough lineup.''
Greinke (3-3) gave up four runs and eight hits in six innings, raising his ERA to 5.26 in eight starts. Greinke led the majors with a 1.66 ERA last season.
''I was all right. Not great,'' he said. ''They had some really good at bats, took a lot of close pitches and were ready to hit anytime I made a mistake.''
Arizona manager Chip Hale said Greinke ''gave us six innings, four runs, a chance to win the game. They did have some good swings against him. I thought they put together some good at bats, pushed his pitch count pretty high.''
Entering the game, Greinke was 8-0 against the Giants with a 2.12 ERA, including a victory in San Francisco earlier this season.
''He's human. He's one of the best in the game,'' San Francisco manager Bruce Bochy said. ''He shut us down the first time we saw him. We got four runs. It wasn't like we beat him up. It was a great matchup between those two. Both cerebral kind of pitchers, our guy today just pitched better.''
Arizona mounted a serious threat in the ninth against closer Santiago Casilla when a pinch-hit double by Phil Gosselin and single by Jean Segura put runners at first and third with one out. Casilla struck out Brandon Drury, but walked Paul Goldschmidt to load the bases. Left-hander Javier Lopez relieved Casilla and the closer emotionally expressed his displeasure at leaving the game, so much so that Bochy called him back to the mound to talk to him.
''He didn't want to come out,'' Bochy said. ''You want these guys not to want to come out, but he got a little too emotional.''
The move was an obvious one, Bochy said, and Lopez got left-handed batting Jake Lamb to ground out, earning his first save since Sept. 19, 2013.
The Diamondbacks fell to 5-13 at home.
Greinke has allowed 24 runs in five home starts. Last season, he gave up 19 runs in 17 starts at home for the Los Angeles Dodgers. He blanked the Giants on one hit through three innings before consecutive singles by Matt Duffy, Buster Posey and Brandon Belt tied it at 1. A fielder's choice groundout by Hunter Pence gave San Francisco a 2-1 lead.
Denard Span singled to start the fifth. Then, Panik hit Greinke's first pitch into the right-field seats to make it 4-1.
Arizona scored one in the first on Drury's RBI single and another in the sixth when Owings tripled into the right-field gap.
Goldschmidt struck out three times and hit into a double play.
The Diamondbacks and city of Phoenix held a ceremony earlier in the day renaming the street in front of Chase Field Randy Johnson Way. The Hall of Famer and five-time Cy Young winner also threw out the ceremonial first pitch.
Before the game, San Francisco recalled RHP Clayton Blackburn from Triple-A Sacramento and optioned OF Jarrett Parker to Sacramento. Manager Bruce Bochy said the pitching help was needed because of how much the bullpen has been used lately. The move left the Giants with eight relievers.
Giants: OF Angel Pagan missed his 11th consecutive game (hamstring strain), but he went through pregame warmups and could, Bochy said, be in the starting lineup Friday night.
Giants: RHP Jeff Samardzija (4-2, 3.17 ERA) faces the Diamondbacks for the first time since April 23, 2014.
Diamondbacks: RHP Shelby Miller (1-3, 7.36), coming off his first good start of the season - at Atlanta, goes for his first home win as a member of the Diamondbacks.