NEW YORK (CBS / AP) — Angel Pagan homered, tripled and drove in three runs on a perfect night at the plate against his former team, leading Yusmeiro Petit and the San Francisco Giants past the New York Mets 8-5 on Tuesday.

Pagan went 3 for 3 with two walks and scored twice from the leadoff spot for the Giants, who have won four straight and seven of nine. His tiebreaking homer in the seventh inning made a winner of Petit (4-0) in his second start since nearly pitching a perfect game.

READ MORE: Oakland Police Arrest Homicide Suspect Who Fatally Shot Male Victim, Fired at Firefighters

Before the game, the Mets announced that Matt Harvey will try to rehab his injured right elbow without reconstructive surgery — a move the All-Star ace hopes is going to keep him on the mound next season.

Pagan homered off Sean Henn (0-1) leading off the seventh to give the Giants a 5-4 lead. It was his first home run since an inside-the-park shot that ended a 6-5 victory over Colorado on May 25.

After that, Pagan missed 82 games with an injured left hamstring that required surgery. He returned on Aug. 30.

Pagan spent four seasons with the Mets before they traded him to San Francisco in December 2011. He helped the Giants win the World Series last year and then re-signed with them for $40 million over four years.

Tony Abreu added an RBI double against Gonzalez Germen in the eighth, and Pagan’s triple off the wall in right-center made it 7-4. Hunter Pence singled home a run in the ninth for his 20th RBI in his last seven games.

Giants reliever Sandy Rosario issued a leadoff walk in the ninth and left with an apparent injury. Sergio Romo gave up an RBI single to Daniel Murphy before retiring Lucas Duda and pinch-hitter Andrew Brown with the bases loaded to end it after 3 hours, 55 minutes.

Mets starter Zack Wheeler threw 107 pitches over five innings against his former team. The rookie walked a career-high six — four in the second inning. Seven New York pitchers combined to issue 10 walks in all.

Wheeler was drafted sixth overall by the Giants out of high school in 2009. Two years later, they traded him to the Mets in a deal for Carlos Beltran. The 23-year-old right-hander threw a gem in San Francisco on July 10, allowing one run and three hits over seven innings in his fifth major league start.

READ MORE: 49ers Playoffs: Faithful Gear Up As Showdown Vs. Packers Nears

Petit, once a Mets prospect, made his second start since coming within one strike of a perfect game Sept. 6 against Arizona. He finished with a one-hit shutout.

The right-hander, who beat Wheeler when they matched up in the minors April 9, gave up four runs and seven hits in six innings.

Jean Machi and Javier Lopez combined on a perfect seventh to protect a one-run lead.

Wheeler walked Pence and Pablo Sandoval to start a three-run second. One out later, walks to Abreu and Petit forced in the first run. Pagan followed with an RBI single, and another run scored Gregor Blanco’s groundout.

The Mets got on the board when Ruben Tejada hit a leadoff double in the third and scored on a groundout by Eric Young Jr. One inning later, they scored three times to take a 4-3 lead.

Petit walked the first two batters of the inning, and Wilmer Flores drove an RBI double off the left-field fence. Murphy scored after running through a stop sign.

Matt den Dekker followed with an RBI single and stayed in a rundown long enough to allow Flores to score.

Pagan drew his second leadoff walk from Wheeler in the fifth and scored the tying run on an RBI groundout by Buster Posey.

NOTES: Giants 2B Marco Scutaro went for an MRI on his ailing left pinkie. The team was awaiting results, but it’s possible Scutaro could miss the rest of the season. For now, he is day to day. Abreu started at 2B. … Mets rookie C Travis d’Arnaud left in the fourth inning with a sore right shoulder after he was hit by Pence’s foul ball in the second. Anthony Recker replaced d’Arnaud, dinged up several times in the past few weeks. … Mets 3B David Wright, sidelined since Aug. 3 with a strained right hamstring, is unlikely to return during the three-game series. This weekend in Philadelphia is a possibility, manager Terry Collins said. … Jerry Seinfeld, a longtime Mets fan, joined the team’s broadcast crew for the pregame show and the game. Seinfeld also broadcast a Mets game against Detroit in June 2010.

MORE NEWS: COVID: Staffing Shortage Has Fremont Schools Desperate for Substitute Teachers

(Copyright 2013 by CBS San Francisco. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)