SAN FRANCISCO (AP) -- Zack Wheeler used to have long talks with Sergio Romo when they were teammates in the Giants organization, and the young pitcher is good pals with Mike Kickham.
None of that mattered when Wheeler took the mound at AT&T Park for the first time. He just wanted to pitch well.
Wheeler threw seven sharp innings, Marlon Byrd homered again and the New York Mets completed their first sweep in San Francisco since 1994 with a 7-2 win Wednesday.
"I was drafted by the Giants and obviously wanted to pitch here," Wheeler said. "I didn't know how I was going to feel when I got out there. Honestly, I was relaxed."
Daniel Murphy and John Buck each had two hits and drove in two runs as the Mets won their fourth in a row, including three straight over the slumping World Series champions. The Giants have lost 16 of 19.
Wheeler (3-1), selected by the Giants with the sixth overall pick in the 2009 amateur draft, took a shutout into the seventh. He allowed one run and three hits, struck out five and walked three.
"That's the best all-around stuff I've seen," Mets manager Terry Collins said. "He pounded the strike zone and got outs. He has a chance to be very good."
San Francisco dealt Wheeler to the Mets in July 2011 for outfielder Carlos Beltran. The trip to San Francisco brought back memories from his time with the Giants.
"Romo and me would talk all the time," Wheeler said. "He'd sit me down and talk me through things. It was fun to be able to watch him pitch the first night."
Matt Cain (5-6) lasted less than an inning for the first time in his career, giving up three runs and two hits while walking three and getting just two outs. He is 0-3 with a 6.38 ERA in his last five starts.
"We needed a chance to win it, and I wasn't giving them an opportunity right there," Cain said. "I was walking guys. They got a couple of hits they needed, and that was it."
San Francisco dropped to 40-50, its first time 10 games under .500 since the Giants finished 72-90 in 2008, according to STATS. San Francisco was swept at home for the first time since July 27-29 last year against the Los Angeles Dodgers.
Wheeler retired 14 of his first 16 hitters before Pablo Sandoval singled for the Giants' first hit with two outs in the fourth. Wheeler also hit an RBI double.
"He was a lot more efficient getting ahead," Buck said. "He just needed to get his feet wet and feel a little more comfortable, but he's also working hard in things."
Cain's home ERA rose to 5.94, the second-highest among qualifying NL pitchers and more than double his 2.03 ERA in San Francisco last year.
"He was disappointed to come out, but I had to make the call," Giants manager Bruce Bochy said. "He's fine, but I didn't want it to become an issue. He was going on 40 pitches there and I didn't want to push him through again."
New York took a 3-0 lead in the first. Eric Young walked, stole second went to third on catcher Buster Posey's throwing error and scored on Murphy's single. Ike Davis and Kirk Nieuwenhuis walked, and Buck ended Cain's day with a two-run single.
Kickham retired 12 of his first 14 hitters into the fifth. That stretch ended when Davis singled and Byrd followed with his 15th homer and second in two days.
Wheeler and Murphy each doubled home a run in the sixth to make it 7-0.
Brandon Crawford singled home a run in the Giants' eighth, and Tony Abreu hit a sacrifice fly in the ninth.
NOTES: Giants RHP Santiago Casilla could be activated Thursday. ... LHP Madison Bumgarner (9-5, 3.05) will start for the Giants on Thursday night in San Diego. He's 5-3 in 15 games against the Padres. ... RHP Jeremy Hefner (4-6, 3.39) gets the start for the Mets on Friday night at Pittsburgh. Since June 4, his ERA is 1.64. ... Mets INF David Wright extended his hitting streak to 11 games with a single in the ninth.
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.