OAKLAND, Calif. -- The Golden State Warriors have become the main attraction in the NBA over the past four years. But in the midst of their impressive run, Stephen Curry's 20-minute pregame ritual has become its own sight to behold.

Before Warriors games, hundreds, sometimes thousands, of fans swarm around the court to watch Curry warm up 90 minutes before tipoff.

"I really started noticing the bigger crowds toward the middle of the [2015-16] season," Curry told ESPN. "I didn't know what to think at first. It was strange, but I was humbled at the same time.

"It's been kind of crazy."

The popularity of his routine, which is generally cut in half on the second night of a back-to-back, has grown so much that rival teams have started opening their doors early for fans to catch the shooting star in action, with permission always granted by Curry and the Warriors. On the road, there could be hundreds of fans camped in the stands around Curry's basket, while players from the home team shoot in front of mostly empty seats on the other end of the court. Local TV partners for both the Warriors and their opponents have televised parts of Curry's routine during their pregame coverage.

"It kind of gets me amped up to see all the people, almost too amped up," Curry told ESPN. "Sometimes, I have to calm myself down and save what I have for the game."

In the past, media surrounded the baseline and sideline to capture photos and videos of Curry that could potentially go viral. But sideline angles were forbidden going into the 2017-18 season because Curry almost stepped on the foot of a media member while doing his shooting drills during the 2017 NBA Finals. A Warriors official witnessed what could have been a disastrous way for their franchise point guard to go down and implemented the new policy.

Still, there are plenty of ways to enjoy the spectacle. Here's a look at how Curry's famous pregame routine became a crowd-pleaser.

Steph Curry's routine has gone from stationary dribbling drills to a series of crossovers on the move. Bart Young/NBA/Getty Images

The entrance

Curry usually emerges from the Warriors' locker room with a hoodie on his head. He then pauses momentarily as security official Norm Davis spots him.

"Warrior coming out!," the 6-foot-2 Davis yells in his baritone voice.

"Hold them up," Curry responds.

Davis, who has been in this job for seven years, used to recite the complete heads-up message -- "Warrior coming out. Hold them up." -- to clear pedestrians out of Curry's path. But over time, Curry took over that portion of the alert.

The announcement initiates an echo effect. Security staffers positioned at sections of the 50-foot hallway leading to the arena bowl all repeat the call. Curry then leaps in the air and sprints hard down the hallway onto the court, where Ralph Walker, the director of team security, stands. Walker, whose job is to shadow Curry, says he used to run behind Curry, but the 64-year-old laughs and says, "Now, I just go wait ahead for him."

Once Curry steps foot onto the hardwood, the fans in attendance roar.

Assistant coach Bruce Fraser, who is already on the court having assisted other players through their routines, gives Curry the nod that he's ready for him. Curry then walks to the Warriors' bench and tightens up his laces. He's focused.

The show is about to start.

Assistant coach Bruce Fraser has many tasks during the routine, including a role as Mt. Mutombo. Noah Graham/NBAE via Getty Images

The drills

Curry's routine has taken on a few variations over the years. Former Warriors assistant and current Charlotte Hornets assistant Stephen Silas is mostly responsible for creating the foundation of the routine.

During Curry's rookie year, Silas was in charge of grooming the young players on the Warriors. Curry, Anthony Morrow, Anthony Tolliver and C.J. Watson made up the early-bird crew that showed up to the arena a little over three hours before tipoff to get in their pregame workouts. They did the ballhandling portion together, consisting of two-ball dribbling while stationary and with movement. After that, they would split up. Silas would take Curry and Morrow and assistant Rico Hines took Tolliver and Watson.

Silas says he designed Curry's routine mainly to get him loose and improve his ballhandling skills.

"I remember when it was brand new to him and he was kicking the ball off his feet, losing it," Silas says. "At times, he had problems alternating with both hands back and forth. It wasn't second nature to him like it is now, but it's a credit to him and how hard he's worked at it. He's one of the best ball handlers in the league, if not the best. He has so much confidence in his game. Those drills probably didn't cement that, but it definitely hasn't hurt.

"Eventually, Steph kind of just took the routine and ran. It's actually funny to me just how popular it's become."

In those days, fans didn't see Curry's shooting displays because the workouts occurred when it was mostly just arena workers walking around.

Today, Curry shares one half of the court with Shaun Livingston for pregame workouts. But Livingston's session typically ends first, allowing Curry to have the court to himself for the last few minutes.

"This is all part of the process. Other players are more intense; he likes to keep it loose." Bruce Fraser

The first drill Curry currently performs is dribbling in motion from the scorer's table to the opposite end with a series of crossovers and between-the-leg action. Once on the other end of the court, he does the same thing but walking backward. This is a relatively new alteration. Curry used to start off with stationary two-ball dribbling along the baseline.

"He's getting tired of all the media on the baseline, so he moved away," Fraser jokes. "I don't know. He hasn't said that out loud."

Curry then moves on to taking left-handed shots on the left side of the basket, launching high-arcing, hook shots. After making five, he transitions to the left elbow where he receives the ball from Fraser, takes a few dribbles and shoots left-handed floaters. He makes five, then moves to the right elbow to toss in five right-hand floaters. Then it's back near the basket on the right side for high-degree-of-difficulty shots with his right hand.

Next, Fraser plays the role of Dikembe Mutombo.

Curry goes out to the right wing as Fraser waits near the paint. The 6-3 guard does a miniature hopping dance in stride before taking off toward the basket. Fraser leaps and Curry attempts an acrobatic scoop shot under the outstretched arms of Fraser. This continues until he makes one. It looks competitive, and there's even a bit of trash-talking going on.

"You might see us laughing from time to time," Fraser says. "This is all part of the process. Other players are more intense; he likes to keep it loose."

Finally, the routine reaches the part fans have really been waiting for: Curry shooting the ball.

Fraser passes to Curry for 20-foot baseline shots. Some are catch-and-shoot, some are dribble pull-ups, some are step-backs, and some are ridiculous shot attempts that still find the bottom of the net.

He then steps behind the line. With cameras flashing and the crowd screaming his name, Curry is in his element.

Swish. Swish. Swish. Swish. Swish.

Fans arrive early to watch one of the greatest shooters in NBA history work on his craft. Nick Laham for ESPN

"I do get in a zone out there," Curry says. "It can feel game-like sometimes."

In the meantime, Fraser has to make sure each pass hits him in the shooting pocket.

"I'm a facilitator of the process more than anything," says Fraser, who played point guard at Arizona in the '80s. "It's cool to see people appreciating Steph's craft. My job in it all is to make sure Steph gets good passes so he gets in rhythm. And that doesn't make me important, it just makes me a part of it."

Curry throws up circus-like shots. He challenges himself to hit less twine on each attempt. Some shots don't even tickle the net.

Meanwhile, the fans are fueling him, clamoring for more.

"Steph is a showman in a really good way," Fraser says. "And he's so good that sometimes when he starts off, all eyes are on him. And when he starts making four or five in a row, you can hear people start to make noises. It would be hard to hear that and not want to keep going."

Says Curry: "You can definitely feel their presence."

He makes 15 shots at five different spots on the floor ranging from 3s to long 2s. And there's nothing routine about this routine -- most of his shots are preceded by fancy, crafty ballhandling to set up the shot. On occasion, Curry might also shoot some half-court shots before continuing his routine.

"What sticks out to me the most is that I'm watching something that has never been seen before," Warriors superfan Ben Sanchez says. "You see him going through his craft, the attention to detail, the willingness to stay hungry. It's so crazy to observe."

Curry then goes to isolation action where he attacks as if he's being guarded by someone. He unleashes everything from curling shots, post-up work, fadeaways, pump-fakes into drives and jumpers, and spot-up shots from long range. He transitions to free throws, around-the-world 3s and usually concludes with a high-arcing 3 in the deep corner.

But he's saving the best for last.

The two-handed tunnel shot is Steph's grand finale ... and a fan favorite. Nathaniel S. Butler/NBAE via Getty Images

The grand finale

Curry is finished on the floor, but there's one more act to go. He walks to the entry of the tunnel to attempt his 40-foot two-handed heave, which has become legendary. He has made this shot numerous times, and the individual who gets credited with the assists, security official Curtis Jones, is stationed near the Warriors' bench.

At 5-10, he's not the most imposing figure, but if you get too close to the players on the court, you're bound to see the 65-year-old enforcer in action. The players love him and acknowledge him every time before taking the floor.

About five years ago, Curry randomly asked Jones to pass him the ball in the tunnel, and the two have become tight and kept it going ever since. Curry says Jones' underhanded toss gives him his mojo.

On one particular game night, Curry missed his first tunnel shot and then the ball was tossed in the direction of Jones. But another security official picked it off and passed it to Curry himself. Curry flipped the ball back to Jones to keep their chemistry intact. Then Curry missed again and the same security guard tried once more to get the tunnel shot assist, but Curry returned the ball back to Jones.

The other security guard got the message. This was the Curry-Jones portion of the show.

"I love it," Jones says. "It's a platform that allows me to talk to a lot of young people and tell them they can do whatever they put their minds to. I appreciate Steph for including me because he's like a living legend."

Jones has a sophisticated approach in setting up Curry for the tunnel shot.

Before each game, he goes to the basketball rack and picks a ball. He told ESPN it can't be "too new, or too old." After he makes a selection, the ball is placed in a secure spot behind the Warriors' bench.

"No one is allowed to touch that ball," Jones says.

When Jones tosses Curry the ball and he comes up short on the heave, Curtis retrieves the ball and passes it back to him again. The superstar might attempt up to five shots. When he sinks it, and he frequently does, he then goes to Jones for the dap-hug before signing autographs for fans.

After his 20-minute workout, Curry spends time signing autographs for fans. Kevork Djansezian/Getty Images

"My favorite is the shot from the tunnel, and how he involves the security guard," longtime season-ticket holder Padraic Ryan says. "Steph has found a way to give some shine to someone who has been with the team for years. That's another reason why he's so special."

Zaza Pachulia, who is always scheduled to take the court for his routine right after Curry, agrees that it's an amazing experience.

"Obviously, fans can't wait for me to get out of the way," he says. "They reach out to Steph, asking him for autographs. And if I'm signing autographs and he's coming after me, if I'm holding somebody's marker, that person can't wait to get the marker back from me to get Steph's autograph.

"I'm not mad, though. I would do the same thing if I were in their shoes. I just love the guy. He's a great human being and deserves all of it."

When Curry is done signing autographs, it's time to make his exit.

"Warrior coming out," echoes in the arena.

Curry races down the hallway and jumps into the wall inside the locker room to stop his momentum. His teammates sit at their locker stalls and hear a big thud but don't pay it no mind. They know it's just Curry returning.

He strolls into the locker room and grabs a bottle of water out of the fridge before heading to the training room. Before the game has even started, Curry has already put on a spectacular show.

"He's just amazing to watch," Fraser says, "and if you can see him shoot these volume shots where he's not missing, it never gets old. You might get a little more used to it, but it doesn't get old."