NEW YORK (AP) San Francisco Giants manager Bruce Bochy knew that in order for his team to beat Matt Harvey, the top of the lineup needed to produce. And produce it did.
Nori Aoki and Joe Panik combined to go 7 for 10 with a homer, four runs and two RBIs as the Giants roughed up Harvey and defeated the New York Mets 8-5 on Wednesday night.
Aoki matched a career high with four hits and Panik had a two-run homer in the first inning - on an 0-2 pitch.
''Those two really got us going,'' Bochy said. ''Panik can do all the little things and Nori is such a tough leadoff hitter.''
Brandon Belt hit one of San Francisco's three homers off a struggling Harvey, and the Giants scored five times in the sixth - the most runs Harvey has allowed in one inning.
Buster Posey had three RBIs, including a two-run double off Harvey that tied the score in the sixth. Belt followed with a two-run shot, and Justin Maxwell added a long homer later in the inning to give San Francisco a 7-4 lead.
The offensive display was in support of Tim Hudson (4-5), who allowed eight hits as he pitched into the sixth inning. With the victory, Hudson has alternated wins and losses over his last seven decisions.
''They picked me up against a really good pitcher,'' Hudson said. ''It was kind of a grind for me most of the night. I was a little out of sorts.''
One night after rookie teammate Chris Heston threw a no-hitter, Hudson didn't have the same magic on the mound against the Mets.
After Panik's home run gave the Giants an early lead, New York tied the game, scoring a pair of runs on three first-inning hits, punctuated by Wilmer Flores' two-run single off Hudson.
''I definitely got the no-hitter conversation out of the way in the first,'' Hudson said with a smile. ''There definitely wasn't any drama from that area like there was last night.''
Panik led off the sixth with a single. Angel Pagan followed with a walk and, after falling behind 0-2, Posey calmly stroked a fastball into right for the tying double.
Posey came into the game batting .368 against Harvey.
Belt then drove a changeup the other way to left-center for his eighth homer of the year, putting the Giants ahead 6-4.
''In my second at-bat, I got a swinging bunt off (a changeup),'' Belt said. ''So I figured he'd throw it again, so I stayed back on it just enough.''
Brandon Crawford was thrown out at third trying to stretch a double, and Matt Duffy flied out before Maxwell teed off for a shot to left.
Harvey (6-4) gave up seven runs for the second time in four starts, matching his career high. He walked two and struck out a career-low two in six innings.
The star right-hander, who missed last season while recovering from Tommy John surgery, has allowed 18 earned runs over his last 18 innings. He fell to 15-1 when the Mets score at least four runs for him.
''Everything was all over the place,'' Harvey said. ''Just a pretty poor performance trying to keep a lead that we had. I'm just not doing my job very well.''
Santiago Casilla closed for his 18th save in 21 opportunities.
Juan Lagares hit an RBI triple in the eighth, and Eric Campbell and Lucas Duda had RBI singles for the Mets, who have dropped four of five.
Flores led off the sixth with a double, chasing Hudson. But George Kontos struck out catcher Travis d'Arnaud, activated from the disabled list before the game, and retired Lagares on a grounder. Campbell struck out to end the threat.
After missing 46 games with a broken pinkie, d'Arnaud doubled and scored twice in his return to the lineup.
Posey added an RBI single off Hansel Robles in the ninth.
Giants: OF Gregor Blanco was placed on the seven-day concussion disabled list. The team recalled OF Jarrett Parker from Triple-A Sacramento. ... The Giants remained without All-Star outfielder Hunter Pence (wrist), who could be headed to the DL.
Mets: To make room for d'Arnaud, the Mets optioned infielder Danny Muno to Triple-A Las Vegas. ... Rookie C Kevin Plawecki (dizziness) was scheduled to undergo tests.
Panik extended his hitting streak to a career-best 14 games. ... Duda snapped an 0-for-16 skid.
The Giants improved their road record to a National League-best 18-12.
Giants: Tim Lincecum (6-3, 3.29 ERA) has won his last six decisions against the Mets and is 2-0 with a 1.50 ERA in three career starts at Citi Field. He'll pitch Thursday night in the series finale.
Mets: Jonathon Niese (3-6, 4.43) has lost his last four decisions and is 1-3 in seven career games against the Giants, six starts, with a 2.98 ERA. Niese has never matched up against Lincecum.