Carlos Beltran hit a pair of homers, David Wright also connected and the New York Mets beat Philadelphia 7-3 on Sunday, preventing the Phillies from clinching their fourth straight NL East title at home.

The two-time defending NL champions came in needing a win and a loss by Atlanta to secure the division crown. The Braves lost 4-2 to Washington, dropping Philadelphia's magic number to one.

Chase Utley hit a three-run homer for the Phillies, who will finish the season on the road with three games at Washington and three at Atlanta.

The Mets roughed up Cole Hamels (12-11) again. Hamels allowed five runs and nine hits in four-plus innings, falling to 0-4 against New York this year. The lefty had been dominant recently. He gave up just four runs in his previous six starts, a span of 43 2-3 innings.

Manny Acosta (3-1) tossed 1 1-3 innings of scoreless relief to earn the win. Mets starter Pat Misch had a 5-0 lead going into the fifth, but couldn't finish the inning. He allowed three runs and seven hits in 4 2-3 innings to remain 0-4.

The Phillies are 45-17 since July 21, when they trailed Atlanta by seven games. They are 19-5 in September and have a six-game lead over the Braves.

The crowd of 45,302 marked the 123rd straight sellout at Citizens Bank Park. Fans came hoping to watch the Phillies win the division at home for the fourth straight year, but now they'll have to wait for the playoffs to break out those "Fightin' Phils" rally towels.

Trailing 5-0 in the fifth, the Phillies got back in it when Utley went deep with two outs to cut the deficit to two runs. Ryan Howard followed with a double, chasing Misch.

A pair of outstanding defensive plays by Mets outfielders saved two runs. Beltran made a diving grab on pinch-hitter Ross Gload's drive to left-center to leave a runner on third in the sixth. Left fielder Nick Evans made a sliding catch on Howard's shallow fly to strand a runner at second in the seventh.

Jimmy Rollins, sidelined since Sept. 8 with a hamstring injury, got a standing ovation when he came up as a pinch hitter representing the tying run in the eighth. He grounded out against Elmer Dessens to end the inning.

Wright gave New York a 1-0 lead, driving his 26th homer deep into the seats in left in the second.

The Mets scored three in the fourth to take a 4-0 lead. Angel Pagan walked leading off and went to third on Ike Davis' single. Joaquin Arias then hit a slow roller near the mound, but Pagan got caught in a rundown and was tagged out.

With two outs and the bases loaded, Jose Reyes drove in a run with an infield single to make it 2-0. Evans followed with a two-run double for a 4-0 lead. Right fielder Jayson Werth slipped chasing Evans' looper and the ball skipped past him. Reyes was thrown out trying to score on the hit to end the inning.

Beltran connected leading off the fifth to make it 5-0, ending Hamels' day. He hit a two-run shot off Ryan Madson in the ninth.

The Phillies twice had a runner on third with less than two outs, but didn't get a run. Raul Ibanez doubled and moved to third on a groundout in the sixth, but Wilson Valdez hit a tapper to the mound and Gload got robbed by Beltran.

With runners on first and third and one out in the fourth, Carlos Ruiz trotted to first after ball three. He was called back to the plate and grounded into a double play.

Notes: The Phillies finished 52-29 at home. ... The Mets finished 32-49 on the road. ... The teams split the season series 9-all. ... Philadelphia hadn't lost consecutive games since Sept. 5-6. ... The Phillies' attendance total was 3,647,249, a franchise record. ... Hamels is 2-8 with a 3.83 ERA in 13 career starts against the Mets.