ST. LOUIS -- Nearly 30 minutes after Monday night's game, Bryce Harper sat slouched in front of his locker in the visitors' clubhouse, a pose copied by more than a few of his Washington teammates.
A season many expected to end with the Nationals sending manager Davey Johnson into retirement with a World Series championship will instead finish with Washington watching the playoffs on TV.
St. Louis administered the killing blow as ace Adam Wainwright worked into the eighth inning while Carlos Beltran homered for the first time in a month as it registered a 4-3 win.
Wainwright (18-9) allowed seven hits and three runs while walking none and fanning five. Beltran snapped a 2-2 tie in the bottom of the fifth when he belted a two-run homer over the right-center field wall, his 24th of the season but his first since Aug. 24.
The Nationals (84-73) lost for just the fourth time in 17 games, but were eliminated from wild-card contention with wins by the Cincinnati Reds and Pittsburgh Pirates. Cincinnati and Pittsburgh sealed wild-card berths at worst.
"It don't feel too good," Johnson said. "We put up a good fight but came up short. Now we're spoilers. We still have a say, but it's tough. We dug our own hole."
Washington stormed back into contention by winning 30 of 42 games from Aug. 9 to Sept. 22, but simply waited too late to play up to its considerable potential. A lineup that hinted at being one of baseball's most power-packed never consistently played that way until the season was more than 100 games old.
The eighth inning was the Nationals' season in microcosm. After leadoff singles by Anthony Rendon and pinch-hitter Steve Lombardozzi knocked off Wainwright, Denard Span bunted the runners into scoring position against reliever Randy Choate.
Ryan Zimmerman's bouncer to short plated Rendon to cut the Cardinals' lead to 4-3. But Jayson Werth, whose 439-foot two-run homer off Wainwright staked Washington to a 2-0 first-inning lead, meekly grounded out to third to end the inning, giving rookie Carlos Martinez two crucial outs on just three pitches.
"I thought something good might happen," Johnson said of the lengthening odds.
Before the top of the ninth, the scoreboard displayed Cincinnati and Pittsburgh's wins. With their season on life support, the Nationals made three quick outs on eight pitches against Kevin Siegrist and Trevor Rosenthal, with Rosenthal picking up his first big league save.
"I didn't know until I came in here," Washington shortstop Ian Desmond said of his team's elimination. "You have enough to worry about just winning the game without seeing what someone else is doing.
"We have a good group of guys who fought for each other. ... We just didn't win enough games."
Meanwhile, St. Louis (92-65) stayed two games clear of Cincinnati and Pittsburgh in the National League Central and reduced its magic number to four. The Cardinals also moved within a half-game of Atlanta for the league's best record, which would give them home-field privilege throughout the NL playoffs.
"This is what everyone talks about," Rosenthal said of the pennant push. "You can't ask for anything more."
Yadier Molina and Shane Robinson erased the Nationals' early lead with RBI singles in the first and fourth, respectively, off rookie Tanner Roark (7-1). In losing for the first time in four starts, Roark gave up nine hits and four runs over five innings.
With the postgame shower the loudest sound in a quiet locker room, Roark summed up his team's feelings.
"It definitely sucks that the season's over," he said.
NOTES: The Busch Stadium outfield was almost completely resodded with 13 truckloads of grass after it was torn up by a college football game Saturday between Southern Illinois and Southeast Missouri State. There were football markings still visible from foul ground behind first base all the way to the left-field corner. ... St. Louis LF Matt Holliday was scratched just before game time and replaced by Robinson. Holliday also missed Sunday night's game due to back spasms. ... Washington finished its home schedule Sunday night and drew 2,652,422 for the year, its highest attendance since opening Nationals Park in 2008. The total represented a 9.1 percent increase compared to 2012.