The first of baseball's four wild-card spots has finally been claimed.

Saturday afternoon, in Game 161, the Mets beat the Phillies (NYM 5, PHI 3) to clinch one of the two National League wild-card spots. James Loney hit a big go-ahead two-run home run and closer Jeurys Familia slammed the door for his MLB-leading 51st save of the season.

Here's video of the postseason berth-clinching out:

Because the Mets hold the head-to-head tiebreaker against the Giants -- they took four of seven from San Francisco this season -- and are guaranteed to have a better record than the Cardinals, they'll be the home team in the NL Wild Card game no matter who they play.

The Mets were able to get back to the postseason despite losing almost their entire young rotation to injury. Matt Harvey, Jacob deGrom, Steven Matz, and Zack Wheeler are all done for the season with various injuries. Neil Walker and David Wright are done for the year too.

Rookies Robert Gsellman and Seth Lugo have picked up the slack in the rotation, and low-cost pickups Jose Reyes and Kelly Johnson bolstered the offense. So did undrafted free agent T.J. Rivera, who has taken over as the regular season baseman following Walker's injury.

usatsi9578525.jpg
They had to settle for a wild card spot, but the Mets are going back to the postseason. USATSI

After bottoming out at 60-62 in August 19 -- the Mets had gone 13-24 in their previous 37 games at the time -- New York has gone 27-12, which is the best record in baseball since that date. Sure, they've had an easy schedule down the stretch, but that doesn't guarantee anything.

Last year the Mets won the NL East and advanced all the way to the World Series before losing to the Royals. This is only the second time in franchise history the Mets have gone to the postseason in back-to-back years, joining 1999-2000.

The Mets will play either the Giants or Cardinals in the NL Wild Card Game at Citi Field on Wednesday, October 5. The winner will advance to play the Cubs in the NLDS.