PHILADELPHIA -- All that chasing has taken a toll on the Philadelphia Phillies.
Bryce Harper hit his 20th homer, Ian Desmond and Kurt Suzuki also connected and the Nationals beat the Phillies 8-4 Wednesday night to move closer toward winning their first division title since moving to Washington.
The Phillies, who closed to within three games of St. Louis for the NL's second wild-card spot following a late push, are on the verge of elimination. The five-time defending NL East champions are 5 1/2 games behind the Cardinals.
They need to go 7-0 and hope St. Louis finishes 1-5 to force a tie, assuming Milwaukee and the Los Angeles Dodgers don't win more than four the rest of the way.
"We've been pushing real hard and it's catching up to us," manager Charlie Manuel said.
The Phillies came from way behind to make it interesting. They were 45-57 and 13 games behind the second wild-card team on July 31.
At least they won't be eliminated at home. The Phillies are guaranteed to be mathematically alive after Thursday's home finale.
"We know where we are in the standings," Kyle Kendrick said after getting roughed up.
The 19-year-old Harper joined Tony Conigliaro as the only teenagers to reach 20 homers in big league history. The Nationals reduced their magic number in the NL East to four, holding a four-game lead over Atlanta with seven remaining.
John Lannan (4-0) gave up two runs and five hits in 5 1-3 innings to win his second start since taking Stephen Strasburg's spot in the rotation. Strasburg, the All-Star righty, was shut down after reaching his innings limit.
Kendrick (10-12) allowed five runs and five hits in two-plus innings.
"I was up in the zone, behind in the count and had no command," Kendrick said.
Jimmy Rollins hit a solo homer, snapping an 0-for-19 slump. But the Phillies couldn't overcome a 5-0 deficit.
Kendrick walked Jayson Werth on five pitches to start the game and Harper drove the first pitch he saw out to deep left-center for a 2-0 lead. Harper matched the feat of Conigliaro, who hit 24 home runs for the Boston Red Sox in 1964.
Desmond connected leading off the second, hitting his 25th homer way out to left-center to make it 3-0. Steve Lombardozzi then reached on second baseman Chase Utley's fielding error and Suzuki followed with a shot out to left to put the Nationals up 5-0.
Kevin Frandsen hit a one-out double in the third to get the Phillies going. He scored when Suzuki threw wild to third on reliever B.J. Rosenberg's sacrifice.
Lannan then pitched out of a bases-loaded, one-out jam by striking out Ryan Howard and retiring Carlos Ruiz on a grounder to the mound.
Frandsen hit a two-out triple in the fourth and scored on Rosenberg's single up the middle in his first official at-bat in the majors.
Rollins hit his team-leading 23rd homer off Ryan Mattheus in the seventh.
Domonic Brown's sacrifice fly off former closer Tyler Clippard cut it to 5-4 in the eighth. Clippard fanned Frandsen to leave the tying run on third.
Werth, jeered in Philadelphia since leaving the Phillies in free agency after the 2010 season, drew loud boos in the ninth after he picked up a foul ball in the on-deck circle and faked tossing it into the stands. Rookie pitcher Justin De Fratus then earned cheers for throwing a fastball high and tight to Werth, who was booed throughout his at-bat.
Werth got the last laugh, hitting a two-run single up the middle. Harper added an RBI triple.
"That's the loudest I ever heard it with me on the field," De Fratus said.
NOTES: Roy Halladay felt fine after a bullpen session and will start on Friday for the Phillies. There was a possibility Halladay would be shut down after experiencing spasms near his shoulder blade last week. ... Ruiz received the Mike Schmidt MVP Award given annually by the Philadelphia chapter of the Baseball Writers' Association of America. Cole Hamels got the Steve Carlton MVP pitcher Award, Rollins received the Dallas Green Special Achievement Award and Juan Pierre got the Tug McGraw True Pro Award. ... Gio Gonzalez (20-8) tries to strengthen his bid for the NL Cy Young Award in the series finale against Philadelphia rookie Tyler Cloyd (2-1).