PHILADELPHIA -- The lowly Philadelphia Phillies do not lack for motivation as the season winds down.
It's entirely possible that the New York Mets provided a little more.
The Phillies scored three times in the sixth inning to take the lead for good in a 7-5 victory over the National League East champions on Wednesday night, right after Mets reliever Hansel Robles was ejected for throwing a fastball near the head of Philadelphia catcher Cameron Rupp.
"It always gets a team going when something like that happens," Phillies manager Pete Mackanin said.
The Phillies were angered when Robles quick-pitched first baseman Darin Ruf in a game in late August, and Rupp believes Robles did it again.
"That was the second time," Rupp said. "This one was a little more dangerous."
The Phillies, now 61-97, are hoping to avoid a 100-loss finish.
"I know I wake up every day, knowing I don't want to lose 100 games," reliever Justin DeFratus said.
Philadelphia is also trying to play the role of spoiler, as the Mets are seeking home-field advantage in their Division Series against the Los Angeles Dodgers.
"I know it's in my head," DeFratus said. "At least if we can't play in the playoffs, then it's nice to not do them any favors."
A wild pitch by New York Mets reliever Carlos Torres brought home the go-ahead run in the three-run sixth inning, in a game that lasted 3 hours, 59 minutes.
Second baseman Daniel Murphy and left fielder Michael Conforto homered in a five-run first inning for the Mets, who dropped their second straight.
DeFratus struck Mets center fielder Yoenis Cespedes on the left hand with a pitch in the third inning. Cespedes left the game, but X-rays were negative. He was diagnosed with contusions of the middle and ring fingers.
"I hope he's OK," said DeFratus, who said a sinker on the inner half of the plate got away from him. "We don't want to be doing them any favors, but that's not the way I want to do it. I feel bad about it."
DeFratus was the first of seven relievers who combined to pitch 8 1/3 scoreless innings for Philadelphia, which won its third straight. Ken Roberts (1-1) retired a single batter to earn the victory, his first in the major leagues.
Ken Giles worked a perfect ninth for his 15th save.
Philadelphia shortstop Freddy Galvis tied the game with a two-run single in the sixth off Bobby Parnell (2-4), the fifth of nine Mets pitchers.
One out later, left fielder Aaron Altherr was hit by a pitch. The runners moved up on a wild pitch by Torres, and Galvis scored on another wild pitch, with Ruf at the plate.
The Phillies added another run in the eighth on a wild pitch by Tyler Clippard.
Both benches emptied earlier in the sixth, though no punches were thrown after Robles delivered his pitch near Rupp's head. Mets manager Terry Collins was also ejected by plate umpire Bob Davidson, in addition to Robles.
Robles later said through an interpreter that a fastball got away from him.
"You can't miss that bad up around the head," Collins said. "I certainly understand (the Phillies' frustration)."
Davidson issued warnings to both benches after Mets starter Logan Verrett hit Phillies center fielder Odubel Herrera with a pitch in the fifth -- two innings after Cespedes was plunked and a half-inning after Philadelphia reliever Adam Loewen hit Cespedes' replacement in center, Kirk Nieuwenhuis, with a pitch.
Mets right fielder Curtis Granderson opened the game with a double off Philadelphia starter Alec Asher, and went to third on a wild pitch. Third baseman David Wright walked, and Murphy hit a 3-2 fastball from Asher into the seats in right center field.
Cespedes then walked, and two outs later, Conforto hit Asher's 2-1 fastball into the seats in left field, making it 5-0.
Asher then departed, having worked just two-thirds of an inning.
Ruf doubled home two runs in the third to cut the gap to 5-2, and third baseman Cody Asche added an RBI single in the fifth to bring the Phillies another run closer.
NOTES: Because of the threat of inclement weather, the starting time for Thursday's game between the Mets and Phillies has been moved up from 7 p.m. ET to noon. ... Philadelphia 3B Maikel Franco, out since fracturing a bone in his left wrist on Aug. 11, likely will rejoin the team Thursday. He recently played in Instructional League games in Florida. Manager Pete Mackanin said Franco would play at some point during the weekend. ... Mackanin also considered playing 1B Ryan Howard on Wednesday for the first time since he injured his left knee on Sept. 14. Howard was unable to start because of illness, however, and Mackanin said it is likely that Howard's season is over. ... Mets LHP Steven Matz, scratched from Wednesday's start because of a sore back, was originally supposed to pitch Thursday. He has now been scratched from that start as well. LHP Sean Gilmartin will go instead.