NEW YORK (AP) Nick Pivetta put a horrible start behind him and stopped the New York Mets just when they were beginning to gain some momentum.

The rookie from Canada allowed one hit in seven impressive innings for his second career win, and the Philadelphia Phillies halted New York's four-game winning streak with a 7-1 victory Sunday.

''My arm felt really, really good today, which was nice. I felt really confident going into the game,'' Pivetta said. ''Just had fun, you know?''

Maikel Franco hit a two-run double in a four-run second aided by a pair of sacrifice bunts. Rookie catcher Andrew Knapp added an RBI single and dashed home from second on a wild pitch by Rafael Montero.

Leadoff man Daniel Nava had three hits and two RBIs to help the major league-worst Phillies (27-53) finish their 4-5 road trip on a positive note. Philadelphia outhit the Mets 12-2 and improved to 15-32 against them since the start of the 2015 season.

But the highlight was Pivetta.

''He had everything working today. I was really happy with the way he attacked these guys,'' Knapp said. ''It's a tough lineup and you can get a little intimidated by some of the names in that lineup, but he went and attacked a lot of guys with his fastball and got ahead of a lot of hitters. That helped him a lot.''

Making his 10th big league start, Pivetta (2-4) permitted only T.J. Rivera's home run on an 81 mph slider with one out in the fifth. The 6-foot-5 right-hander, obtained from the Nationals in a July 2015 trade for closer Jonathan Papelbon, struck out four and walked four.

''I think he still needs work on his secondary pitches, but once he hones those pitches, he's got a chance to be really good. I really like him,'' Phillies manager Pete Mackanin said . ''He certainly showed that he learned something from his last outing.''

Pivetta was coming off the worst performance of his brief career, when he gave up six runs, seven hits and five walks over 2 2/3 innings last Monday in a 6-1 defeat at Arizona.

''That was my No. 1 focus, is a rebound right there,'' Pivetta said. ''I just had an off outing last time.''

New York had won seven of eight since getting swept in four games at Dodger Stadium. But the Mets (38-43) played a haphazard game Sunday heading into a three-game series at NL East-leading Washington.

''We've got our work cut out for us, but there's no reason why we can't be optimistic and think you're going to have a good second half because our pitching's starting to come around and Yoenis Cespedes is not going to continue to struggle,'' manager Terry Collins said.

Tommy Joseph and Nick Williams opened the second with consecutive singles before Franco doubled off the base of the left-center fence to snap slumps of 0 for 13 and 5 for 33.

Ty Kelly sacrificed and Franco scored when Knapp singled sharply past drawn-in second baseman Asdrubal Cabrera.

After a sacrifice by Pivetta, Montero (1-5) threw a wild pitch that ricocheted off the foot of plate umpire Ramon De Jesus and bounced away. Mets catcher Rene Rivera had no idea where the ball went, and Knapp never broke stride as he rounded third.

''I called a changeup. He threw a curveball,'' Rivera said.

By the time he tracked down the ball near the Phillies' on-deck circle, Knapp was sliding home ahead of an off-target throw.

''When you're not the fastest guy, you've got to go hard all the time,'' Knapp said. ''The way we're playing, we need all the bases we can get.''

A replay reversal and some clumsy defense helped Philadelphia score three times in the eighth off Chase Bradford. Pinch-hitter Brock Stassi had a two-out RBI single, and Nava followed with a two-run single.

ENCOURAGING SIGNS

Once a well-regarded prospect, Montero has mostly struggled in the majors. But he lasted a season-high 6 1/3 innings Sunday and has 21 strikeouts with a 2.89 ERA in four games (two starts) since being recalled June 14.

TRAINER'S ROOM

Phillies: Slumping CF Odubel Herrera was rested in favor of Nava. ... RHP Vince Velasquez allowed one run over two innings Saturday night during his first rehab outing for Triple-A Lehigh Valley. Velasquez has been on the DL since May 31 with a right elbow flexor strain. ... LF-2B Howie Kendrick, on the 10-day DL with a strained left hamstring, is scheduled for an MRI on Monday.

Mets: Hot-hitting CF Curtis Granderson sat out with a stiff hip and is day to day. He was replaced by Brandon Nimmo, who batted leadoff in his first major league start this season. ... Collins said closer Addison Reed was unavailable after saving three straight games.

UP NEXT

Phillies: A seven-game homestand leading into the All-Star break begins with four against Pittsburgh. RHP Aaron Nola (5-5, 4.13 ERA) starts the opener Monday night vs. Pirates RHP Ivan Nova (8-5, 3.08).

Mets: LHP Steven Matz (2-1, 2.67 ERA) gets the ball Monday night in Washington against RHP Stephen Strasburg (9-2, 3.51). Coming off seven shutout innings at Miami, Matz is 2-0 with a 1.80 ERA in three road starts this season.

---

More AP baseball: https://apnews.com/tag/MLBbaseball

Copyright 2017 by STATS. Any commercial use or distribution without the express written consent of STATS is strictly prohibited.