On the night the Yankees clinched their first AL East title in seven years, Brett Gardner was all over the basepaths.

He scored a run in the second inning, homered in the fourth, hit a two-RBI double in the sixth and walked and scored in the eighth.

It was another stellar night in a wildly productive year for the 36-year-old Gardner, who many expected to be a fourth outfielder when spring training began.

“It means a lot,’’ Gardner said of how well he has played in such a successful season in The Bronx. “I’ve had more fun playing baseball this year than I ever have. It’s been a fun seven months.”

That’s what happens when you have a career year and your team races away with the AL East title for the first time in seven years.

Gardner was around in 2012 for the last division crown in The Bronx, but it’s not a season he remembers especially fondly.

“It feels like a long time ago,’’ said Gardner, who suffered an elbow injury that year which required surgery, limiting him to 16 games. “I wasn’t playing a lot and I wasn’t much of a part of that title,’’ Gardner said. “It’s nice to play a part in this one.’’

His home run Thursday was his 26th of the season and it was the third time he knocked in three runs in his past eight games. During his current six-game hitting streak, Gardner is 10-for-23. But he provides much more than offense.

“He’s a guy you know wants to be here more than anyone else,’’ Luke Voit said. “All he wants to do is win and it he’s one of the main reasons we’re in the spot we’re in today.”

Because of the injuries the Yankees have dealt with, particularly in the outfield, Gardner’s presence — and production — have been key.

And he’s enjoying this latest run.

“That’s the reason I signed back here 10 months ago,’’ Gardner said. “I wanted to have a chance to do this. Step 1 was to win the division, which is a great accomplishment. But that’s not what we’re trying to do.”

Instead, he wants to win a second World Series title, alongside CC Sabathia.

“We’re gonna try to stay focused like we have all year and see where the next few weeks takes us,’’ Gardner said. “The last couple years we gained some great experience in the playoffs, but come up short. This year, we’ve gone out there and proven a lot of people wrong with all the guys we’ve missed. We don’t want to stop now.’’