A long time ago on the Internet — seven years, to be exact — Donald Glover went viral on social media by campaigning to play Spider-Man.

His fans clamored for the “Community” star to don the web-slinger’s iconic suit as the first Spider-Man of color, demanding inclusion in the business of superhero blockbusters. Glover even joined the campaign himself, helping the hashtag #Donald4Spiderman trend on Twitter.

Alas, he didn’t get the call from Sony. (Andrew Garfield landed the role, only to be rebooted out of Spider-Man’s spandex after two films.)

He did eventually voice Spider-Man in Disney XD’s “Ultimate Spider-Man” animated series, playing Miles Morales, the half-Latino, half-black teenage Spidey introduced in 2011 in the comics as a character Peter Parker meets while hopping through alternate universes.


But the fans never forgot the promise of #Donald4Spiderman. And “Spider-Man: Homecoming” director Jon Watts was one of those fans.

Director Jon Watts, left, with cast and crew on the set of “Spider-Man: Homecoming.” (Chuck Zlotnick / Columbia Pictures)

The filmmaker happens to be married to former talent agent Dianne McGunigle, who repped Glover at CAA before becoming the actor, producer and rapper’s manager and is currently an executive producer alongside Glover on his award-winning FX series, “Atlanta.”

So when Glover’s Spider-Man campaign was in full force in the summer of 2010, Watts was well aware. “I’ve known Donald for a really long time, so when that was all going down I was right in the middle of it,” he explained to The Times.


And when he scored the “Spider-Man: Homecoming” gig, he took the grassroots campaign straight to his Sony and Marvel bosses on the set of “Captain America: Civil War,” where he’d come to watch his new Peter Parker, Tom Holland, film his introductory cameo into the Marvel Cinematic Universe.

“One of the very first things I said to Kevin [Feige] when I got the job was, ‘We’ve got to put Donald Glover in this movie. I don’t know who he’s going to be, or what he’s going to do, but we have to figure out a way,’” said Watts.

Feige’s response? “He said, ‘Yes — absolutely.’”

× Watch the trailer for “Spider-Man: Homecoming.”


Watts, one of six credited writers on “Spider-Man: Homecoming,” ushered Glover into a small but memorable role in his high-school-set standalone adventure that will have Miles Morales fans cheering. (Warning: Minor spoilers follow.)

The “Atlanta” star turns up in the Sony and Marvel film as Aaron Davis, a Queens man involved in a high-tech weapons deal with henchmen of Michael Keaton’s supervillain, Vulture. Later he shares another scene, giving advice and intel to Holland’s awkward Peter Parker.

His character’s name is another nod to the comics — and a crucial one to fans of the Ultimate Spider-Man storyline. In the alternate universe of the comics Aaron Davis is a career criminal known as the Prowler whose young nephew, Miles Morales, is bitten by a spider and becomes the new Spider-Man.

Watts and Co. designed the Glover cameo as a surprise treat for fans. “It was fun to come up with those ideas and talk to Donald about it,” he said. “You never know what’s going to go where in a movie like this.”


MORE: The future of ‘Spider-Man’ rests with indie director Jon Watts »

And because Glover’s Davis drops an Easter egg-style reference to his “nephew” in one of his scenes, he also cracks the door open to promising possibilities for fans who are still clamoring to see a more inclusive Spidey in the Marvel blockbuster franchise — where the character, despite hailing from one of the most diverse neighborhoods in New York City, still looks like Tobey Maguire, or Andrew Garfield, or Tom Holland in the movies.

We already know that Morales will be the central character of Sony Animation’s upcoming untitled Spider-Man project, which is written and produced by “The Lego Movie” duo Phil Lord and Chris Miller and due for release in 2018. “Dope” and “The Get Down” star Shameik Moore will voice the character.

But does Glover’s “Homecoming” turn mean we might see a flesh and blood Morales — or a black, Latino, Asian, you name it — Spider-Man in the MCU anytime soon?


“I have no idea what’s happening beyond this movie at this point,” Watts answered, “but that would be so cool.”

jen.yamato@latimes.com

@jenyamato


ALSO

A breakdown of Peter Parker’s new super suit in ‘Spider-Man: Homecoming’

Inside the deal that brought Sony’s ‘Spider-Man’ back to Marvel’s cinematic universe