Ten years ago, a Yankees squad for the ages would win its 27th World Series. In their new book, “Mission 27,” Mark Feinsand and Bryan Hoch take readers behind the locker-room doors of that 2009 team, telling how they came together to win the last championship for the “Core Four.” In this exclusive excerpt, the team gathers for Alex Rodriguez’s July birthday party, thrown by then-girlfriend Kate Hudson.

Alex Rodriguez was renting a swanky mansion in Rye, a suburb approximately 20 miles northeast of the Stadium. Virtually the entire team — players, coaches, support staff, wives and girlfriends — made their way to the exclusive Milton Point neighborhood to toast A-Rod’s 34th year on the planet.

Catering was provided by Nobu, and most attendees were dressed in their finest garb as they explored the grounds of the Parsonage Point estate. The distant, twinkling lights of Manhattan were visible from across the Long Island Sound, and the guests were wowed by Kate Hudson’s decorative touches and attention to detail.

“That party was huge for us,” CC Sabathia said. “That was like the first time we had something where almost everybody on the roster came, and we had a blast. Just doing something together away from the field, I think it helps guys. You may not really bond with this guy or like this guy so much, but if you see him in a different light, different place, you might be able to. I think it just helped us get that much closer.”

Hudson wasn’t the only A-list entertainer at the party. Jay-Z counted Sabathia as a close friend and would later ink him as a client for his Roc Nation Sports agency. In fact, Jay-Z was around so much that season, some referred to him as the 26th man on the roster.

“He was a part of the team,” hitting coach Kevin Long said. “I don’t know if Jeet’s going to take this the right way, but he might’ve been the team captain.”

The party continued late into the evening, and as the music thumped and booze continued to flow, someone suggested that they should shoot around on the mansion’s impressive basketball court. That turned out to be a poor decision for Phil Hughes, who attempted to dunk over Jay-Z and fell to the hard court, an act that his teammates still chuckle about a decade later.

“Hughesy was an epic fail on that one,” Joba Chamberlain said with a laugh. “He tried. I mean, the effort was there, but it just didn’t happen. I don’t know how to describe that, other than it just didn’t happen.”

As the bash appeared to be winding down — Rodriguez remembers it as being “the seventh inning of the party” — A.J. Burnett and Sabathia were drawn toward the estate’s impressive Olympic-sized swimming pool.

“Me and CC had a plan from the first minute: We’re ending up in the pool,” Burnett said. “It was just a beautiful spread: tables lined up around the pool, food, awesome. I was like, ‘You know we’re going to end up in there,’ and he’s like, ‘Oh, for sure.’ ”

The pitchers had mentioned their plan to A-Rod, expecting to receive some pushback.

“As the night’s going on, we had a few [drinks] or whatever. We walked by Alex and mentioned to him, ‘Hey, we’re going in the pool later,’ ” Burnett said. “He said, ‘Oh, yeah, I’m in. First one.’ And we kind of just looked at each other like, ‘This dude ain’t gonna jump in. Come on, yeah right, Alex.’ ”

The smoke was still in the air from the extinguished candles on Rodriguez’s cake when he backed up his words, making no effort to remove his expensive articles of designer clothing. Cannonball!

“He blew out his candles and ran and jumped in that pool,” Burnett said. “I looked at CC, CC looked at me, and we ran and jumped in. Then everybody runs and jumps in. It was wild. Phones, watches, everything on. It was just, ‘Oh, he did it. We’ve got to go.’ ”

Burnett said that Hudson leapt into the pool after Rodriguez, followed by Amber Sabathia and Karen Burnett. Incredibly, Joe Girardi was right behind them.

“It got to the point of, ‘Why aren’t any coaches in here?’ ” Burnett said. “So Joe jumps in and starts grabbing people, grabbing coaches, grabbing teammates, chucking people in left and right. It was awesome. It was great bonding. If you would’ve told me that was the way that birthday party was going to end up, I probably would’ve been like, ‘You’re crazy, no way.’ ”

Amid the splashing and laughter, one of the younger Yankees was opting to remain on the sidelines.

“Dave Robertson was balking; he was actually upset,” Long said. “He was very upset. It was almost to the point he was tearing up, he was so upset.”

Robertson was an admittedly green rookie, having boarded the New York-Scranton shuttle multiple times throughout the 2008 campaign. He opened 2009 at Triple A, going up and down twice during the first two months of the season before sticking with the Yankees for good in late May.

“I didn’t want to get in the pool,” Robertson said. “I didn’t think I would be at a high-school party. I was past college and past high school and just didn’t think it warranted it. I was wearing a brand-new suit because I had just been to an event with Johnny Damon. I had one suit and, yeah, I wasn’t into it.”

“He didn’t have any money, and A-Rod bought him that, and it was an expensive-ass suit,” Nick Swisher said. “I don’t blame him for not jumping in.”

With more than two decades of pro baseball experience as a player and coach, Long understood that bonding with teammates far exceeded the value of whatever designer threads Robertson had on his back. He tried to coach the young pitcher, but Robertson wasn’t budging.

“He’s in front of the house, sitting on the steps, and I’m like, ‘Listen, Dave, everyone’s being thrown in. You need to go do that,’ ” Long said. “He was saying, ‘I don’t want to. Alex bought me this suit; I really like it.’ I said, ‘Dude, he’ll buy you another one.’ ”

“He was about ready to fight somebody if they dragged him in the pool,” Hughes said.

Burnett ultimately convinced Robertson to get into the pool — or threw him in, depending on which account you’re inclined to believe.

“I think A.J. pushed him in,” Sabathia said. “He was pissed at somebody. A.J. would haze D-Rob at that point in his career, always giving D-Rob s- -t. To see D-Rob turn around and actually be pissed, I remember he was chasing A.J. down.”

Nearly a decade later, Robertson’s amicable mood darkened when asked about the party.

“I remember wanting to get out of there as quickly as possible,” Robertson said. “There were some people that almost got some blows thrown at them that night. It wasn’t funny then, and it isn’t funny to me now.”

Robertson’s memories from that night may be unforgettable, but at least he can recall specific details. That is not the case for some of his teammates.

“I don’t remember a single thing, bro,” Swisher said. “I do remember everybody having an awesome night.”

And a horrible morning. The one aspect of the party that Hudson failed to consider was the Yankees’ schedule. They had a 1:05 p.m. game against the A’s the next day, and even with Girardi granting a late mandatory report time, the world was moving slowly for some of the overserved.

“I threw up on the way home and had to pitch the next day, a day game against Oakland,” Hughes said. “I was so hung over, I didn’t know if I was going to make it through. I felt absolutely miserable.”

It is a testament to the quality of that team that, at far less than 100 percent, they were able to post a 7-5 win some 16 hours after Rodriguez’s leap into the deep end.

“I never played with him before, and I didn’t know him, but I knew this wasn’t the Alex I had heard about. This guy’s great.”

July was a busy month on the Yankees’ social calendar. A few weeks later, Sabathia distributed invitations to a birthday party that was held at the 40/40 Club, a luxury sports bar and lounge owned by Jay-Z. Located steps from Madison Square Park in Manhattan, the establishment has huge plasma screens and multiple private lounges. For Sabathia’s party, Jay-Z’s people added a little more sizzle.

“They had chicks sitting on the stairs, and they had snakes on them,” Chamberlain said. “I don’t like snakes, but if you’re a hot chick with a snake on you, I’m probably going to stare at you. I woke up the next day with one sock on and all the lights on in my house.”

For Rodriguez, the acceptance that he felt on the night of his birthday party offered another indication that he was moving past his early-season drama.

“I never played with him before, and I didn’t know him, but I knew this wasn’t the Alex I had heard about,” Burnett said. “This guy’s great; are you s- -tting me? If you would’ve told me he was going to jump in that pool, I would’ve said, ‘No chance.’ You just saw his personality coming out as that year kept going on. I think everybody enjoyed seeing Alex like that. He just kept opening up little by little that whole year, and that party really made us come together.”

The Yankees held sole possession of first place, A-Rod was performing well on the field (he had a .917 OPS and 19 home runs through 67 games), and he was a part of a group that could help him fill the biggest void on his baseball resume: a championship.

As long as they could back it up on the field, these Yankees were free to indulge their Animal House impulses, and no one wanted to miss the next party.

“I had been with them for five years, and we had never done that before,” Rodriguez said. “We all let our hair down and gave in to the moment.”

From “Mission 27: A New Boss, a New Ballpark, and One Last Ring for the Yankees’ Core Four,” by Mark Feinsand and Bryan Hoch, presented with permission from Triumph Books. For more information or to order a copy, please visit triumphbooks.com/mission27.