David Wright’s 30th birthday was a few weeks away, likely bringing the Mets third baseman as close — or closer — to the end of his career as its beginning.

It had been six seasons since Wright made his lone trip to the playoffs and four years since he had been on a winning team. His nights at Citi Field were played to half-empty crowds, void of teammates from the 97-win team of 2006. In one more year, though, Wright could walk in free agency, and perhaps sprint to a contender, no longer having to play the title role of the best player on a perennially bad team.

But Wright believed in the only team he ever knew. And there was nowhere else he wanted to be.

“Things haven’t gone the way we would have liked the last couple of years, but that’s going to change,” Wright said upon signing an eight-year, $138 million contract after the 2012 season. “It wouldn’t be as meaningful if I were to win somewhere else.”

Another two losing seasons followed, with Wright no closer to where he wanted to be.

“At the time, I didn’t think it was the move,” former teammate Cliff Floyd said of the extension. “The reason being you didn’t know what direction the Mets were going in.”

Wright spent countless days envisioning the playoffs again, with nine years passing in between postseason berths.

When it came, Wright moved slowly, watching teammates sprint past him to join the euphoric mob, jumping up and down in front of the Cincinnati mound on Sept. 26. It wasn’t how he pictured it, on the back side of 32 and with a serious back injury, fighting the freedom of unrestrained joy.

After nine years, even celebration had changed. His smile had, too.

“You go through it in 2006 and 2007 and 2008, and you kind of believe that’s going to be the standard,” Wright said after clinching the NL East title. “I don’t think you truly appreciate it until you go through some of the years we’ve been through. … I think that’s something maybe I took for granted those years that I don’t take for granted anymore.

“This has been a long time coming and it’s been too long. … You almost have to pinch yourself because this is what you dream about.”

For most of the season, all Wright could do was dream. For much of the season, it seemed even if the Mets made the playoffs, Wright wouldn’t be there.

For more than four months, the face of the franchise wasn’t seen, sidelined with spinal stenosis and saddled with questions whether he would ever play again.

Finally, the Mets were contenders again, and Wright could only watch.

“Personally, I didn’t expect to obviously have the injury and diagnosis that I had [and] I think that was a big motivating factor for me being away from the team as long as I was and doing the days of rehab, just thinking about what it would be like when I came back and hopefully helping this team win and reach the goal of making it to the playoffs,” Wright said.

He returned on Aug. 24, producing one of the most memorable moments of the magical season with a home run in his first at-bat. He returned to third base and his place near the top of the lineup, hitting .277 with four home runs in 30 games.

[mlbvideo id=”406682683″ width=”640″ height=”430″ /]

Equally significant, manager Terry Collins said, is having the team’s most important voice back at the most crucial time of the year.

“There was a reason why a few years ago we said we think David Wright should be the captain of this team,” Collins said of the only remaining captain in the majors. “This guy’s personality and the way he carries himself is huge. … His presence is huge in there. His leadership is huge. I think having him back in the lineup made a big difference. We’re glad that he’s back, glad he’s healthy. With ample rest, he can still be a huge impact in our lineup and he’s shown that.”

Wright leads with experience and insight, relaying to younger teammates about coming one inning short of reaching the World Series and of the back-to-back late-season failures that followed. He leads just by being there, by being who he is.

“Being a young guy, you watch David all the time,” catcher Travis d’Arnaud said. “He’s our captain. He cheers up the mood in the clubhouse. When anyone’s down, he’ll pick you up. He’s just always there for you.”

The role has greatly evolved since Wright made his first playoff appearance as a 23-year-old in his second full season.

“He was just a youngster and he didn’t say a lot,” said Floyd, now an analyst at MLB Network. “He just went out and played, but he was a guy who could carry us when he got hot and he was one of the most valuable guys that we had.”

Though Wright hit .333 (4-for-12) with two doubles and four RBIs in the division series against the Dodgers, the third baseman struggled in the seven-game NLCS loss to the Cardinals, hitting .160 (4-for-25).

“He brought great energy, but it was his first encounter with a playoff scenario and I’m sure he felt a lot of pressure,” former hitting coach Rick Down said.

Wright remembers the extra adrenaline and the additional noise, but said he expects that little will be different after the first at-bat and the first fielded ball.

“You try to treat it like any other game,” Wright said.

But it’s a game he has been waiting nearly a decade to play, a moment he knows he may never get again.

“Just try and soak it in as much as you can, live in the moment,” Wright said of his advice to younger teammates. “It’s nine years in between my first one and my second one. Don’t take it for granted. … Just enjoy it.”