Updated

The New York Mets put together a strong finish Friday night. It just wasn't enough to make up for Dillon Gee's slow start.

Gee allowed four runs in the first two innings, and the Mets' rally fell short in a 4-3 loss to Ian Kennedy and the Arizona Diamondbacks.

"I made some pitches, made a couple of mistakes," Gee said. "Just a couple of things that really cost us the game."

Justin Upton homered in the first inning. Cody Ransom doubled in two more runs in the second, and Kennedy helped himself with a run-scoring double.

Manager Terry Collins said Gee got away from his curveball after Upton hit one into the seats in left.

"It goes to show what is happening with Dillon and that is if he gets frustrated with something, if he doesn't make a good pitch, he gets away from things," Collins said, "and he has to stick with what made him successful."

Gee (10-4) gave up five hits in five innings, dropping to 3-4 with a 5.61 ERA in his last nine starts. The rookie right-hander went 7-0 with a 3.05 ERA in his first 12 appearances this season.

"I wasn't really upset about the one run," he said. "Really it was the next inning that bothers me. I gave up a couple of hits and all of a sudden they score three runs, before you know it."

Jason Bay went 3 for 4 and drove in a run in the Mets' third straight loss and ninth in 12 games. After struggling throughout the season, Bay is hitting .415 (22 for 53) in his last 14 games.

He said he was "as uncomfortable as you can feel in the batter's box" until recently.

"Now I feel like I am a hitter in that box and don't worry about anything else," Bay said.

Arizona pulled two games ahead of second-place San Francisco but lost first baseman-outfielder Xavier Nady to a broken left hand when he was hit by a pitch in the second.

The Mets rallied with a run off setup man David Hernandez in the eighth and another off closer J.J. Putz in the ninth. But Putz recovered to record his 28th save in 32 tries.

With their 66th victory, the Diamondbacks topped their win total for all of last season, when they finished last in the NL West for the second year in a row. They have won four straight.

Kennedy (15-3) allowed a run and six hits in seven innings to tie Philadelphia's Roy Halladay for the most wins in the NL. He struck out five, walked three and hit a batter.

"Maybe he didn't have his best stuff tonight," Arizona manager Kirk Gibson said, "didn't locate as well as he has in the past, but he found a way through it."

Kennedy has won his last seven starts, tying the Yankees' CC Sabathia and Detroit's Justin Verlander for longest streak in the majors this season. He hasn't given up more than three runs in any start during the streak and hasn't lost since July 3.

The 26-year-old Kennedy came from the New York Yankees in December 2009 as part of the three-team deal that sent Curtis Granderson from Detroit to the Yankees.

The Mets loaded the bases with one out in the fourth on a hit batter, single and walk, but Kennedy fanned Ruben Tejada on three pitches, then struck out Gee to end the inning.

New York broke through in the fifth when Angel Pagan singled, took second on David Wright's walk and scored on Bay's second single of the night.

Bay led off the eighth with a double off Hernandez. He took third when Josh Thole lined out to right and scored on Tejada's groundout.

After a foul ball hit a support beam on the Chase Field roof, a very rare occurrence, pinch-hitter Scott Hairston doubled off Putz to start the ninth, then took third on a groundout. He scored on Willie Harris' sacrifice fly, but Wright grounded out to second to end the game.

NOTES: Only the AL's Verlander (17) and Sabathia (16) have more wins than Kennedy. ... Kennedy's three walks matched his season high. ... Arizona's Daniel Hudson, coming off perhaps the worst start of his young career, goes for his 12th victory Saturday night. The Mets will counter with Mike Pelfrey, who is 0-4 mark with a 9.68 ERA in four starts at Chase Field. ... Diamondbacks pitchers have 28 RBIs, by far the most in the majors. ... Bay has reached safely in 14 straight games.