Jerad Eickhoff struck out 10 in seven dominant innings, Darin Ruf hit a two-run homer and the Philadelphia Phillies beat the NL East champion New York Mets 3-0 on Thursday to complete a three-game sweep.

The Mets have a half-game lead over the Dodgers for home-field advantage in the division series, which begins next Friday. Los Angeles plays at San Francisco on Thursday afternoon.

The Phillies lost 14 of 16 to the Mets before sweeping them in a three-game series for the first time since April 26-28, 2013, at Citi Field. Philadelphia needs to win one of its last three games against Miami to avoid losing 100 games for the first time since 1961.

More from FoxSports

An announced crowd of 13,238 was the smallest in the 12-year history of Citizens Bank Park. Only several hundred fans were in the stands for a game that was moved up seven hours because heavy rain is expected later.

Eickhoff (3-3) gave up two infield singles, two doubles and no walks while tying his career-best with 10 strikeouts for the second consecutive start. Jerome Williams pitched the eighth and Luis Garcia finished off the six-hitter for his second save in four tries.

Rookie Sean Gilmartin (3-2) made his first career start for the Mets after 49 relief appearances. He allowed two runs and three hits in five innings.

Gilmartin didn't give up a hit until Jeff Francoeur doubled with two outs in the fourth. Ruf followed with a line drive deep into the empty seats in left field. Ruf has eight homers and 22 RBI in 93 at-bats against left-handers.

Andres Blanco hit a solo homer in the eighth off Dario Alvarez.

Eickhoff, one of several prospects the Phillies acquired from Texas in the trade for Cole Hamels, has been impressive. He has allowed three runs or fewer in seven of eight starts and has a 2.65 ERA.

Eickhoff pumped his fist and pounded his glove after striking out Juan Lagares on his final pitch to leave two runners on in the seventh.

TRAINER'S ROOM

Mets: OF Yoenis Cespedes, as expected, wasn't in the lineup after bruising two fingers on his left hand when he was hit by a pitch Wednesday night. He's expected to play before the regular season ends. ... LHP Steven Matz, who was scratched from Wednesday's start because of a back injury, is slated to pitch Saturday or Sunday. ... SS Wilmer Flores (back spasms) expects to be ready Friday. ... 3B Juan Uribe (chest) is scheduled for tests on Friday.

Phillies: 3B Maikel Franco was activated from the disabled list and should play Friday. Franco has been out with a broken wrist since Aug. 12.

UP NEXT

Mets: RHP Noah Syndergaard (9-7, 3.34) starts the opener of a three-game series against Washington.

Phillies: RHP Aaron Harang (6-15, 4.86) opens a three-game series against Miami. LHP Justin Nicolino (4-4, 4.16) starts for the Marlins.