This story appears in the November issue of ESPN The Magazine. Subscribe today!

During his 40-year comedy career, Garry Shandling created two of the most iconic and influential TV shows of all time. But instead of following "It's Garry Shandling's Show" and "The Larry Sanders Show" with another television masterpiece, Shandling worked on something else: a pickup basketball game. During the 25-year run of the weekly Sunday game, until Shandling's death at age 66 in 2016, it was attended by celebrities such as Sarah Silverman, Sacha Baron Cohen, Will Ferrell, Brad Pitt, Adam Sandler and Judd Apatow, who directed the recent HBO documentary "The Zen Diaries of Garry Shandling."

But Shandling's was not a "Hollywood" game. Participants weren't allowed to network there or talk about it afterward. "It was 'Fight Club' with better jokes," says Shandling's writing partner Suli McCullough. The players respected this to protect the singular refuge Shandling carefully constructed.

Those Sundays yielded friendships that are responsible for some of the best television and film of the past 20 years. As director Alex Richanbach says, "This group of people found a little family in Los Angeles because we all have the same comedy dad." This is the story, told by the players, of how Shandling's generosity, drive and anxiety led to a three-decade basketball game -- and the next generation of comedy.

ALEX RICHANBACH, DIRECTOR, "IBIZA"; PLAYED FROM 2012 TO THE END: In the early '90s, Garry was working seven days a week on "The Larry Sanders Show," and it was just overwhelming. So on Sundays, he would invite friends and writers from the show up to the house to play basketball, and then they'd go back into the house and eat and start talking through scripts for that week. And when "Sanders" ended, everybody wanted to keep playing.

SULI McCULLOUGH, WRITER, THE "TONIGHT SHOW WITH JAY LENO"; PLAYED FROM 1997 TO THE END: He'd send an email that just said, "The game is confirmed for Sunday at noon. Bring medical equipment."

DAVID MIRKIN, EXECUTIVE PRODUCER, "NEWHART", "THE SIMPSONS"; PLAYED IN THE EARLY '90s: It's a beautiful house in Brentwood, above Mandeville Canyon.

JAY ROACH, DIRECTOR, "AUSTIN POWERS", "GAME CHANGE"; PLAYED FROM 1999 TO THE END: He lived in this little cul-de-sac there, and the front gate was always propped open [with a rock].

CHRIS HENCHY, CO-FOUNDER OF FUNNY OR DIE; PLAYED FROM 1994 TO THE 2000s: There was always three boxes of Maria's pizza and a spread of Mexican food or sandwiches from Joan's on Third. Garry would have had some healthy shake that was in the blender in the sink. We'd watch him put on his contacts, and we'd go to the court.

WAYNE FEDERMAN, COMEDIAN WHO GUEST-STARRED ON "SANDERS": You go down this path to get to the basketball court, which was below street level because he's on the side of a mountain. The steps were dirt, with a wooden beam across each. You descended into this oasis of trees and bushes and foliage. And in the middle of all this greenery is this beautiful little three-on-three basketball court.

ROACH: One of us would volunteer to blow leaves off the court, and there'd be a bunch of basketballs that were at varying levels of inflation. We were supposed to start playing at 11, but it started drifting to 11:30.

FEDERMAN: Classic three-on-three. Make it, take it. There was no 3-point line. You called your own fouls. Games were to 7 by 1. You couldn't dribble in -- you would check it.

HENCHY: The pole was in, but you had to be careful because people ran into it. The top of the wall was out. The wall was in.

DAVID DUCHOVNY, GUEST-STARRED ON "SANDERS"; PLAYED BASKETBALL AT PRINCETON IN 1979 AND IN SHANDLING'S GAME FROM 1995 TO 2008: The court was built into a hill, and there was a wall behind the basket that kept the hill from falling down into the court. It was considered poor form to actually try to throw a bounce pass off the wall, but if it happened to hit the wall, Garry would say, "The wall is in." But he would also say, "My head is in."

"You descended into this oasis of trees and bushes and foliage," comedian Wayne Federman says of the court that belonged to Garry Shandling, above. "And in the middle of all this greenery is this beautiful little three-on-three basketball court." Courtesy Alex Richanbach

RICHANBACH: Wayne Federman was the commissioner. He chose the teams.

FEDERMAN: It was a very delicate job. Sometimes there'd be 10 people, so somebody would have to sit out two games in a row. My goal was to assess everyone's playing ability to try to make all the games as even as possible. It would give me a lot of satisfaction when it was like, "It's 6-6, and the next shot wins." But my mission statement in that whole time was: Make sure Garry got in as much games as possible.

ZACK SCHILLER, PRESIDENT, BOIES/SCHILLER FILM GROUP; PLAYED BASKETBALL AT COLUMBIA FROM 1997 TO '99 AND IN SHANDLING'S GAME FROM THE LATE '90S TO THE END: My job there was to set up Garry and make him look good. Garry used to call me the Rebounding Machine because he's like, "Every time I miss a shot, I just get the ball right back."

McCULLOUGH: You want to play well and you don't want to hurt anybody. Those are the two basic rules for getting invited back.

MIRKIN: There was a rebound, and we all go under the net. This very funny comedian, Jeff Cesario, jumps up to get the ball, and he comes down and lands on -- it's not even accurate to say "lands," but he just touches the side of my sneaker and he snaps his ankle. I stopped playing because I felt so guilty.

AL FRANKEN, FORMER U.S. SENATOR: Alan Zweibel once swiped at the ball and broke my thumb. I went to the doctor and got the plastic cast they put on your thumb that looks like a thumb. The doctor said, "OK, it's probably as swollen as it'll get, so I should give you another cast that's about the size of your thumb when it's not swollen. How big is your thumb when it's not swollen?" And I had to show him my other thumb. I wasn't very confident in that doctor.

ADAM McKAY, DIRECTOR, "ANCHORMAN," "THE BIG SHORT"; PLAYED FROM 2002 TO THE END: Sacha Baron Cohen rolled his ankle. I'm just so used to seeing that, so I'm like, "Sacha, it just hurts a lot." Then I saw his ankle. It was bigger than a softball.

ROACH (ALSO EXECUTIVE PRODUCER OF "BORAT"): Todd Phillips was the first director on "Borat," and we shut down for a few months until Larry Charles came on. Because Sacha hurt his ankle at Garry's basketball game, he got protection from an insurance plan that allowed us to, uh, account for our hiatus.

GREG KINNEAR, CO-STAR OF "WHAT PLANET ARE YOU FROM?"; PLAYED FROM 1998 UNTIL THE FILMING OF "BORAT": I was increasingly worried about a wonky ankle getting me dragged off in an ambulance. I'd heard that Billy Crystal got injured there, and Sacha's injury was around the time I said, "Check, please."

BILL MAHER, HOST, "REAL TIME WITH BILL MAHER"; PLAYED IN THE EARLY '90s: It was not a Barack Obama-serious game, where you have refs and timekeepers. If anyone got too serious, it was, "Find another game. We're just having fun."

HENCHY: I just remember my mom saying, "Don't be an a--hole so you get invited back to things." Not that you were that fearful, but Garry would occasionally go to Hawaii for four weeks and not say anything. You'd go, "What happened?" And you'd call somebody like Wayne Federman on Sunday and casually be like, "What're you guys doing today?" and find out that Garry's in Hawaii. And when you knew Garry was in Hawaii, you'd say to someone who didn't, "Why weren't you there Sunday?"

Jack Nicholson and Shandling attend a Rockets-Lakers game at Staples Center in 2012. Noel Vasquez/Getty Images

BROOKE SHIELDS, MARRIED TO HENCHY; SHANDLING GAME CHEERLEADER FROM 1999 TO 2005: My husband came home and said, "The weirdest thing happened. Garry said, 'Brooke should come over and just hang out if she wants.' He never allows anybody to just hang out." The game was a precious thing, and the only female ever there was Sarah Silverman. I thought, "I can't handle not playing basketball but still being invited, so I'll be a version of the lone cheerleader." Garry and I both had mothers who really ruled our lives emotionally, so we would swap commiserating humor [about their "presence," even though they weren't there]. I'd get up to go to the bathroom and mime handing her to Garry, like, "Here. Take her for a minute." That would just make him giggle.

HENCHY: Adam McKay and Will Ferrell were the Bash Brothers. They'd do a weird high-five and yell, "Bash Brothers. Oh yeah. Oh yeah."

McKAY: Ferrell and I were constantly clapping our hands, saying, "Goddamn it, Sarah, you gotta come around that pick!" The whole bit was just to yell and be obnoxious, getting fake-pissed about something.

McCULLOUGH: Sarah would take the air out of you. I did some move and made a shot. Sarah was like, "Yeah. Great. No smile to it. I love the no smile." It was a way of s--t-talking me in a way that I had never been s--t-talked. Whenever Henchy got a bucket, he would just say under his breath, "Freight train."

RICHANBACH: Did Henchy tell you he called himself the ArcLight? Because he has the best screens in Hollywood.

DUCHOVNY: Kevin Nealon did a character: Giraffe basketball coach. He'd say, "OK, fellas, look, this is what we're gonna do," and then he'd act like he was chewing a branch right in front of him. "Guys, you gotta get back on D. All right, hands up." And then he'd chew a little more.

JIM GRAY, SPORTSCASTER; WARMED THE BENCH FROM 2000 TO THE END: If I missed a shot, Garry would rush over to me like I would at the end of a game to John Stockton or to Michael Jordan and overdramatize it the way [NBA reporters] do to make it seem like it was the biggest thing ever. And I would say the stuff that I'm sure the players who were talking to me on the court wanted to say: [Sarcastically] "Yeah, the whole team is convening tonight. They're jumping off the Brooklyn Bridge."

BOB COSTAS, SPORTSCASTER; BLEW IT IN HIS LONE GAME IN 1995: In tonight's programs, starting at guard, at 5-7, out of Syracuse, Bob Costas.

FRANKEN: He's not 5-7, by the way.

COSTAS: Let's say 5-7 because, what the hell, I deserve a break. The one thing I could always do well was shoot. So Bruce [Grayson] is guarding me and he's about my size. I'm thinking, "Well, I can do something in this game." And I missed about 80 percent of the shots. Garry was commentating: "Oh, it's only a matter of time." "In and out." "Tough luck." "Aw, man." "You can tell he has the stroke." But then it became, "I changed my mind." "Don't pass it to him under any circumstances."

BEN STILLER, GUEST-STARRED ON "SANDERS"; PLAYED IN THE '90s: Adam Sandler is, like, a serious ballplayer. It was funny because Sandler and I were contemporaries- -- I've known him from when he was on "Remote Control" doing the character he did ... StudBoy or something. But we didn't really socialize that often. And when we would see each other [at Garry's], we'd sort of work everything out on the court. Now we're really, really close friends.

ALAN ZWEIBEL, CO-CREATOR OF "SHANDLING"; PLAYED FROM THE BEGINNING TO 2004: One of the first times I played, Garry points to this girl and says, "You guard her." I got pissed. Like, "You give me the girl?" It ended up being Sarah Silverman, and she was f---ing great. Much better than I was.

SARAH SILVERMAN, STAR OF SEASONS 5 AND 6 OF "SANDERS"; PLAYED FROM THE MID-'90s TO THE END: The first time I met Jeff Goldblum, I was at Garry's house playing basketball. I was 24 or 25. Jeff did not play, but we hung out afterward in the kitchen and slowly became friends.*

JEFF GOLDBLUM, GUEST-STARRED ON "SANDERS"; ALLEGEDLY PLAYED IN THE MID-'90s: Sarah was startlingly funny and spectacular. Maybe it wasn't that day, but I did play basketball once at Garry's house. I'm tall, so I think I rejected a couple of things and had a layup that I liked.*

ROACH: I'm not sure you'd expect Adam McKay to be a great player, but he has a great mid-distance set shot. Will Ferrell had a great jump shot. Duchovny was a beast. And there was no one with a crazier shot than David Arquette. He'd just sort of fling the ball.

McCULLOUGH: It was like David was playing shot put. You'd look at this shot and be like, "There is no way this s--- is going in." And it would go in.

DAVID ARQUETTE, ACTOR; PLAYED FROM THE LATE '90s TO THE EARLY 2010s: I wasn't aware it was quite that ugly, but you take what you can get.

FEDERMAN: Garry always seemed like, "Oh, I'm the nebbishy Jewish guy having trouble dating girls," and all of that stuff that he would do in his act. But Garry was physically pretty strong.

BRUCE GRAYSON, SHANDLING'S GROOMER AND BEST FRIEND; ATTENDEE OF THE FIRST AND LAST GAMES: Garry had a scoop shot from the corner. He would pretend he was gonna do a hook, and then when the guy fell for it, he would switch it to an underhand scoop from the right-hand side of the court.

ZWEIBEL: Working with Garry is very intense. But as soon as the game started, it was a different energy. Garry on the basketball court was more approachable -- a little bit less self-involved. He actually seemed at ease.

RICHANBACH: Garry used to say that "The Larry Sanders Show" was about people who could be open to an audience or to a camera but not to each other once the camera was off. And he said the game was the inverse: a lot of people, mostly involved in show business, who could come and be open and vulnerable to another group of people. He never had a wife or kids or any of that kind of stuff. He had his friends.

GRAY: Garry had a lot of quirks. "Should I do this show?" "Should I not do this show?" "What did you think of this?" "I'm going to do this stand-up, come listen to me." "Was I any good tonight? I think that was good tonight. Was it funny or was it not funny?" He didn't want to work because it was disabling to put so much into something. He was in constant search for perfection because if you touch it once, you want to touch it again. But it's impossible to grasp, so things with Garry never ended. I mean, the house was never finished.

FEDERMAN: The house is just ridiculous: this beautiful Spanish house that he wasn't happy with. Of course, he designed and built the house.

McKAY: When I found out it was custom-built, I was stunned. I thought for sure he just bought it from someone and wanted to fix it. I think the plans for the rebuild were on his dining room table the entire time I went to the game, from 2002 all the way to the end.

JESSE BRADFORD, STAR OF "FLAGS OF OUR FATHERS", USA NETWORK SERIES "SHOOTER"; PLAYED FROM THE EARLY 2000s TO THE END: Toward the end, Garry developed a little bit of a wheeze, and it was a way to stay conscious of where he was, because he was very stealthy. I've since wondered if he knew that and would shut down his wheezing so that he could sneak up behind you like a shark.

GRAYSON: The recovery from the thyroid surgery was more than a year and a half. He was on the mend. But he had come back from Hawaii because he had a couple of abscesses in his teeth, and I think that infection really stressed his body out. He sounded winded when he got back, but it didn't strike me as if he was in that bad of shape. He was like, "I think I want to call a game." That was his expression: "I think I want to call a game."

AL LUBEL, COMEDIAN; PLAYED FROM 1998 TO 2012: I talked to him the night before he died. I was going to be on Marc Maron's podcast, "WTF," and [comedian] Tim Rose said, "You should tell Garry. He likes hearing what you're doing." I hadn't talked to him in four years, but Garry was so nice. He was telling me that he hadn't been feeling well, and he goes, "But I'm gonna go see the doctor tomorrow morning." I called Tim back and said, "Garry's voice just didn't sound good, but he's going to the doctor tomorrow. Do you think I should call him and tell him he should go now?" And Tim goes, "Al, Garry's just going to tell you 'I got an appointment for tomorrow morning.' I regret to this day that I didn't call him back.

"You want to play well and you don't want to hurt anybody. Those are the two basic rules for getting invited back," says writer Suli McCullough, left, here at a game with Grayson, Shandling, Nealon and actor Breckin Meyer. Courtesy Kevin Nealon

BILL ISAACSON, SHANDLING'S LAWYER; PLAYED FROM THE LATE '90s TO THE END: I'm the executor for Garry's estate. When he passed away [from deep vein phlebothrombosis], people said, "Can we open up the house and play one last game?" There was a release from the basketball but also just a lot of wandering around. I walked into his study and he had a legal magazine open that had an article about me, all drink-stained like it had been out there for a while.

KEVIN NEALON, RESCUED AN INJURED DOG THAT HE GAVE TO SHANDLING; PLAYED FOR MANY YEARS: I went into his office that day after he died, and a script I'd given him was still sitting on his desk.

RICHANBACH: McKay was like, "This game was Garry's third masterpiece." "It's Garry Shandling's Show." "The Larry Sanders Show." And this game. The world didn't know that this third masterpiece of his was basically forming a family and helping everybody through this incredibly tumultuous career that they're in.

KATHY GRIFFIN, GRAMMY- AND EMMY-WINNING COMEDIAN; ATTENDED THE MEMORIAL GAME: At the memorial game, a lot of guys had stories about straight up going from being unemployed to Garry giving them their break. In the comedy industry, there's not a lot of comedians helping comedians because you're raised in a competitive environment. So to have someone be generous through multiple generations of people and hire them or give them advice or steer them in a direction ... it had a weight.

GRAYSON: He would get a special joy when people from the game worked together, even though it was supposed to be -- by Garry's own rules -- a non-show-business game.

ROACH: I met Adam McKay there and we did the Will Ferrell-Zach Galifianakis movie "The Campaign" together.

HENCHY: Adam McKay and I knew each other from the basketball game, where I also met Will Ferrell. And we then founded Funny or Die.

BRADFORD: Garry took his own success and went, "What's the best thing I could do with this? Well, s---. It's literally to help others."

PETER BERG, EXECUTIVE PRODUCER OF FRIDAY NIGHT LIGHTS, LONE SURVIVOR; CO-OWNER WITH SHANDLING OF WILD CARD WEST BOXING GYM: He befriended a whole group of fighters that only knew him as "G." Garry would support their work and their work ethic and help them if they needed to know how to take care of their money and tell them they had to make sure they had trustworthy investors. If you were a lawyer or an agent, Garry wouldn't help you.

RICHANBACH: There was a long period of time where it felt like all of Garry's spare time was going into helping me through my wife's medical issues. But after he passed away, I found out that Garry was doing this for everybody. I honestly think that all day long Garry was either on the phone or with his friends. There's no other explanation for it.

GRAY: I drive by his house. Not often, but once every three or four months. And I went today -- I always bring a little rose from my backyard to put on his front gate. Today the rose was red. And the front gate was there, but the house was just gone. Oh god, it was just awful. I set the rose at the front gate, and that'll be my last trip over there. But I thought, "Well, you know, Garry has what he wants now. The house will get redone."

FEDERMAN: The house has been torn down, but the court is still up.

RICHANBACH: We're still playing basketball. This sounds corny, but you think about Garry when you're there. I like to think that he would just be, like, really happy that we all still want to play basketball together. And then he would probably say to me, "See, I told you it wasn't about me."

*Quotes from Sarah Silverman and Jeff Goldblum were taken from unused reporting for a GQ story on Goldblum.