Five years ago, San Francisco was saved from unspeakable evil.

A 5-year-old boy dressed in a cape rescued a damsel in distress, defused a bomb and chased an archvillain around AT&T Park. The police chief dispatched his cops to help, and the mayor gave the little hero a key to the city.

Thursday marked the fifth anniversary of that day, which was unlike any other in San Francisco history. It was the day Miles Scott was granted his dream by the Make-a-Wish Foundation and 10,000 people — all chanting “Batkid! Batkid! Batkid!” — turned out under sunny autumn skies to cheer him on and witness a rare bit of good news and collective goodwill.

In a black Lamborghini decked out to resemble the Batmobile, Miles was whisked around town as an elaborate set of staged scenes played out involving cops, firefighters, cable cars, bad guys and special effects. Social media went nuts, and if it was all a charade, nobody told Miles.

Now Playing:

But as it turns out, the good news was just getting started. Miles is now 10, and his leukemia is in remission. His daily visits with doctors are down to once a year, and five years after his epic adventure he’s now cancer-free.

Miles lives with his parents and two younger siblings on a family farm in Tulelake (Siskiyou County). The fifth-grader plays Little League baseball and enjoys science and robotics. Not long ago, he sold his first goat at a local fair.

But the family hasn’t forgotten the day Miles captured the bad guys and the hearts of everyone else.

“This wish meant closure for our family and an end to over three years of putting toxic drugs in our son’s body,” said Miles’ mother, Natalie.

The wish meant so much to the Scott family that, not long ago, Natalie applied to be one of the foundation’s official wish-granting volunteers. With 60 chapters across the U.S., the Make-a-Wish foundation grants 15,000 wishes a year to children with critical illness.

For a long time, Miles truly believed he was Batkid.

“He just thought he was doing his job,” said Jen Wilson, one of the Make-a-Wish directors who put the citywide event together. “He took his work seriously. He thought Batkid might need to stick around.”

Batkid’s wish inspired others to wish big, too.

Kaheem, a 5-year-old boy in Owings Mills, Md., was granted a wish to become Super Kaheem. Another kid in Texas got his wish to have a Bat Cave built in his backyard. Many other wishes that the foundation grants involve family trips to places that have roller coasters.

But it was Batkid who was responsible for working the biggest miracle of all. In the weeks after Miles’ heroics, donations to the Make-a-Wish Foundation soared higher than any superhero.

“It was an incredibly powerful boost to our organization,” Wilson said. “Batkid was responsible for that.”

Steve Rubenstein is a San Francisco Chronicle staff writer. Email: srubenstein@sfchronicle.com