When Barack Obama spoke in front of 240,000 people in Chicago’s Grant Park on Nov. 4, 2008, his victory speech brimmed with idealistic optimism about working together to build a more perfect union.

As he ended on a “Yes, we can” crescendo and the crowd roared, a swell of music burst from the speakers around the first Black president-elect of the United States. It wasn’t Bruce Springsteen or perennial Obama favorite “Signed, Sealed, Delivered (I’m Yours),” by Stevie Wonder. It was the instrumental score from the 2000 Disney film “Remember the Titans.”

More than just adequately presidential in tone, composer Trevor Rabin’s “Titans Spirit” carried the weight of the beloved movie and the story of how a high school head football coach Herman Boone (played on screen by Denzel Washington) and assistant coach Bill Yoast (Will Patton) came together to fight racism and lead the newly integrated T.C. Williams Titans in Alexandria, Va., to win a 1971 state championship.

Rabin, a progressive South African who grew up during apartheid, had no idea that Obama planned to use his music that night and got “teary eyed” watching it on TV. “A fellow composer called me and said, ‘Hey, man, that worked better than in the film,’ ” Rabin said.

In fact, every NBC Olympics broadcast since 2002 has incorporated the score into its closing credits montage. When the Washington Capitals finally won the Stanley Cup in 2018, Rabin’s theme provided the backdrop to the trophy presentation. And just days before Apple co-founder Steve Jobs died in 2011, he invited his successor, Tim Cook, to his home, where they watched “Remember the Titans” together.

“I was so surprised he wanted to watch that movie. I was like, “Are you sure?’ ” Cook recalled in Rick Tetzeli’s “Becoming Steve Jobs” memoir. “Steve was not interested in sports at all.”

But the enduring appeal of “Titans” 20 years after its release on Sept. 29, 2000, lies precisely in the fact that it isn’t a traditional sports movie. As Washington said on the film’s media tour, “I don’t think it’s a football movie. I think it’s a movie about the potential of the human spirit.”

Part history lesson, part action, part heartwarming family drama with a dash of humor and a killer soundtrack, the film transcends genres. That same fluidity, however, made the script a near impossible sell for writer Gregory Allen Howard in the 1990s.

One of few Black screenwriters working in Hollywood at the time, Howard said he shopped his pitch to “every single buying entity in Hollywood” and every single one rejected it.

“A couple of them said, ‘If you get rid of the race stuff and just do it as a football movie, we’ll buy it,’ ” Howard recalled. “I said, ‘We’re not doing it. That’s what makes the story special.’ ”

He decided to write a script on spec and repitch the finished story. But again, everyone turned him down. Ready to quit the business entirely, Howard received a phone call from Chad Oman, a partner of film producer Jerry Bruckheimer’s, who thought “Titans” could work as a Disney project.

Howard’s original R-rated script would need to be retooled to fit within a more Disney-friendly PG rating, losing all of its curse words and instances of the n-word (“That specific word had to be excised to Disney-fy it,” Howard said), but they would keep the many layers of the story intact.

Still, a “civil rights sports movie” was a low priority for the studio. With a $30 million budget, producers had modest expectations for its success and hired director Boaz Yakin in part because his background as an indie filmmaker meant he’d know how to scrape together a decent movie out of the relatively meager amount of money they were willing to allocate to “Titans.”

Disney wanted to make “just a simple children’s movie, basically like ‘The Mighty Ducks’ or something but with racism,” Yakin said. “I kept pushing for what I considered a more sophisticated, expansive version of the story. And Jerry was trying to rein me in and, at the same time, make a movie that could get released by Disney. So, it was these three different perspectives that all had to meld, and finally, through that tension came the movie that it ended up being.”

Already an Oscar winner for “Glory” and an additional three-time nominee, Washington was the clear choice to embody the gruff, larger-than-life Coach Boone. “I remember being so afraid, but I said, ‘If you don’t get Denzel, I’m not sure you should make that movie,’ ” casting director Ronna Kress recalled telling Bruckheimer.

Washington was hesitant, but according to Howard, the actor’s wife, Pauletta, eventually persuaded him to take the role. And when Washington arrived on the set in north Georgia (which doubled as 1970s Alexandria for budget and aesthetic reasons) in the fall of 1999, he immediately elevated the production.

“Denzel walked onto that set, and I was like, ‘Oh, right. That’s what a movie star is,’ ” Yakin said. “You literally feel the air bending around him. It’s really quite something to see.”

For the actors playing the Titans — an ensemble that included Donald Faison, Ryan Hurst, Wood Harris and a fresh-faced Ryan Gosling — Washington’s presence was as intimidating as Boone’s was to their characters.

“When Denzel was around, you got your s--- together a little bit. You stood up straight,” said Ethan Suplee, who played offensive lineman Louie Lastik. But for one brief moment, Washington’s enthusiasm for the New York Yankees in the 1999 World Series caused the method actor to break his stern exterior between takes.

“Denzel got out a broom and started waving it in the air, rooting for New York to sweep Atlanta — and we were shooting in Atlanta, so you could tell how radical that statement was,” Suplee said. “That was the only time that he ever let this facade of being the coach crack a little bit.”

For Yakin, a self-described “Jewish kid from the Upper West Side” of Manhattan who “knew nothing about football and had zero interest in it,” helming a film centered around a football team provided a special challenge. Bruckheimer instructed him to study up with football coordinator Mike Fisher, and for two weeks before shooting, the actors were sent to a professional training camp with Fisher and other pros to learn the ropes.

“When I went in, I thought, maybe they’re just going to have us put on some pads and toss a football around, maybe do a couple laps,” said Earl C. Poitier, who played defensive lineman Darryl “Blue” Stanton. “That wasn’t the case. They made it as realistic as possible. We’re hitting sleds, we’re running, we’re hitting each other. I was so out of shape, it was brutal. But we bonded through the pain that they put us through.”

At 19, Gosling’s most notable credits before “Titans” were “The Mickey Mouse Club” and TV’s “Young Hercules.” And even though his role as cornerback Alan Bosley was one of the smallest, his charisma made the part unforgettable.

After dismissing Gosling as “a White boy who couldn’t dance,” Yakin said the Canadian raised the bar when it was time to shoot the choreographed “We are the Titans” team song.

“Ryan got up in front of everybody and just did the moves, like, so smooth. I was like, ‘What the …?’ ” Yakin said. “But, in fact, that’s what sort of broke the ice for everybody else.”

With the caveat that it was “inspired” by a true story and not “based” on one, the film took liberties with the real history of the 1971 T.C. Williams Titans team. Some fictional characters (including Gosling’s) were added, while real ones were eliminated or combined. And although several Alexandria high schools did consolidate in 1971 to reduce racial imbalances, the city’s public school system had officially desegregated six years prior.

Bruckheimer stressed that the film is “not a documentary,” while Howard said, “When people start talking about accuracy, how accurate was Shakespeare’s ‘Julius Caesar’? Did Marc Antony really say ‘Friends, Romans, countrymen’? I have no idea! It doesn’t matter. You just have to maintain the spirit of the piece. You can change a bunch of s---, but you can’t violate the spirit.”

As “Titans” came together in postproduction, it became clear that Disney had an unexpected hit on its hands. Bruckheimer summoned a massive spectacle of a premiere at the Rose Bowl, complete with a fighter jet flyover, and a second premiere was held in Washington, D.C., attended by President Bill Clinton, the Rev. Jesse Jackson, and the real coaches and players. Yakin even remembered Clinton leading the former Titans in a school chant after the screening.

But despite ultimately earning $136.7 million worldwide, more than 10 times its budget, “Titans” was considered a fluke. Studios didn’t clamor to commission more Black stories or rush to produce Howard’s other scripts, such as “Harriet,” a Harriet Tubman biopic that had been in development since the early 1990s and for which a White studio exec once suggested that Julia Roberts play the titular role.

“You would have thought after ‘Titans,’ that would have been a paradigm shift for the industry and then they’d say, ‘Hey, let’s start doing diverse stories,’ ” Howard said. “No, they didn’t. It was an outlier. I was an outlier.”

It wasn’t until the success of “12 Years a Slave” in 2013 and “Black Panther” in 2018 that Howard felt things begin to change: “Harriet” was released last year, and he’s currently working on multiple projects, including biopics about Emmett Till and ballerina Misty Copeland.

In classrooms and corporate training programs across America, “Titans” continues to be used as an educational tool to teach cooperation, perseverance and racial harmony.

“They used to show ‘Remember the Titans’ in [my] history class when they were teaching about racism,” said Hayden Panettiere, who was just 10 when she played Coach Yoast’s football-loving daughter Sheryl. “It always made me cringe to be put on the spot like that, but if I had to choose any of the movies I’ve been in to watch, it would be ‘Remember the Titans.’ ”

Still, there is no denying that “Titans” presents a tidy, PG-rated portrait of racial reconciliation. The tense moment a police officer stops a Black player in the film quickly turns to relief and admiration as he congratulates the young man on a game well played, and by the movie’s end, all but one of the White characters have been absolved of any inherent racism.

“I think if it were being remade today, it would probably be best not to be handled by Disney,” said Wood Harris, who played defensive end Julius Campbell. “Because race and racism are things that historically are serious, and we as a culture are too ignorant to present it in any kind of less than very realistic way.”

Harris’s own grandfather was convict leased and his mother grew up in the Jim Crow South, where, he said, “she couldn’t look at a White person walking down the street. Think about that. She literally had to step off the sidewalk.”

“I feel hopeful that things are changing, in the sense that kids are ready to hear the truth. I don’t think ‘Remember the Titans’ reveals the ugly truth, but I think it’s a step,” Harris said. “It brings you into the discussion, and now you can go visit the truth of things.”

Added Yakin: “Our whole perspective on race and where we’re at in the discussions, it’s in a different place [in 2020]. In some ways, it’s more advanced. And in some ways, we’ve taken two steps back.”

Ashley Spencer is a freelance writer and reporter whose work has appeared in The Washington Post, the New York Times, Vanity Fair and elsewhere. Follow her at @AshleyySpencer.