PHILADELPHIA (AP) -- Matt Harvey crossed off a bunch of firsts he was in no rush to achieve.

Philadelphia Phillies' Ryan Howard rounds the bases after hitting a home run off New York Mets starting pitcher Matt Harvey during the fourth inning (AP Photo/Matt Slocum)

First career loss before June. First career loss to the Phillies. First loss this season.

Ryan Howard homered and drove in two runs, Cole Hamels outpitched Harvey and the Philadelphia Phillies beat the New York Mets 3-1 Friday night.

Harvey (5-1) allowed three runs and six hits in six innings. The hard-throwing righty was 10-0 in 16 starts in April and May and 5-0 in his first six starts against Philadelphia.

"It's different, but we've all been going through it," Harvey said about pitching on extra rest because of two off days this week. "You just have to deal with it."

Hamels (2-3) gave up one run and four hits in seven innings, striking out eight. Philadelphia's Freddy Galvis was 3 for 3 with a walk, raising his team-best batting average to .351. Ken Giles tossed a perfect eighth and Jonathan Papelbon finished for his sixth save in six tries.

"Hamels was dealing," Mets catcher Kevin Plawecki said. "We had a little trouble with the off-speed stuff. Hamels mixed his pitches well, kept us off-balance."

Hamels, who came in with the lowest run support in the NL at 1.67 runs per game, didn't need much while rebounding from a rough start - six runs allowed in a 7-0 loss at Miami.

"He's still Cole Hamels," Mets manager Terry Collins said. "Still has a big fastball and devastating change. He stepped up and we didn't do much."

Howard gave the Phillies a 2-1 lead when he led off the bottom of the fourth with a drive out to left-center. Howard has hit all six of his homers in the last 15 games.

Ben Revere's RBI single in the fifth extended the lead to 3-1. Carlos Ruiz started the inning with a single and advanced on Hamels' sacrifice.

The Phillies took a 1-0 lead in the first on Howard's RBI single. Galvis hit a single, stole second and scored on Howard's hard liner.

The Mets tied it at 1 in the fourth when Hamels threw a wild pitch with the bases loaded.

Hamels improved to 9-14 in 32 starts against New York. The three-time All-Star has given up one run or fewer in three of his last four starts.

The Phillies beat the Mets for only the fifth time in the last 20 games.

The Mets wasted a chance after Dilson Herrera led off the third with a double. Harvey struck out trying to sacrifice, Curtis Granderson fouled out and Juan Lagares fanned.

TRAINER'S ROOM

Mets: 3B David Wright has developed back pain and his rehabilitation program has been put on hold. The seven-time All-Star has been sidelined since April 15 because of a strained right hamstring. An MRI on his lower back showed no structural damage and Collins said it's not a major injury. ... RHP Dillon Gee is heading to the 15-day disabled list because of a groin injury, paving the way for prospect Noah Syndergaard to make his major league debut on Tuesday.

"It's a good move to get him up here early," Collins said about calling Syndergaard up on Saturday. "He can get used to things. If he throws strikes like he's been doing, he'll be fine."

OWNING PHILLY

The Mets snapped a four-game winning streak against the Phillies. They have the best visiting record at Citizens Bank Park, 55-47. They're 21-8 in Philadelphia since 2012.

UP NEXT

Mets: LHP Jonathon Niese (2-2, 2.40) looks for his fifth straight win against the Phillies in Game 2 of this series. Niese is 9-6 vs. Philadelphia, including 4-0 in his last six starts. The Mets are 6-0 in those games.

Phillies: RHP Aaron Harang (3-2, 2.35) makes his 15th career start against the Mets. Harang is 6-6 with a 4.06 ERA vs. New York.

(© 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed)