Beltran finished 3-for-5 while Nick Evans added three hits and two RBI for the Mets, who have won two in a row following a six-game slide. David Wright hit a solo home run.
The Phillies entered Sunday’s game with a magic number of two for clinching the NL East, and that diminished by one when Washington beat second-place Atlanta. But the Mets prevented Philadelphia from securing its fourth straight division title outright by getting to Hamels (12-11).
The left-hander had won his last five starts, allowing just two earned runs in 36 2/3 innings over that span (0.49 ERA). He also did not allow a home run in any of those starts.
But Sunday, Hamels gave up five runs on nine hits — two of them homers — and three walks in four-plus innings.