Batkid had a police escort worthy of a dignitary as he sped around the city in a black Lamborghini with Batman decals, with officers blocking traffic and riding alongside him on motorcycles.
"I think it might be the first time a Lamborghini had a booster seat," said Patricia Wilson, the executive director for Make-a-Wish in the Greater Bay Area.
The crowds grew after each stop, reaching into the thousands. Spectators climbed trees and clambered up lampposts, and police and organizers struggled to keep a path open for the motorcade.
At Batkid's stop in the city's Russian Hill neighborhood, a woman sat on the cable car tracks in a dress and thigh-high black boots. She had a handkerchief around her mouth, and her hands were bound behind her back.
Batman and Batkid sprang into action, with the aid of a trampoline, as the crowd roared. They rescued the woman and disabled a plastic replica bomb she was tied to.
The two masked superheroes then took off to nab the Riddler as he robbed a downtown bank. They later jetted to the Penguin's kidnapping of Lou Seal.
The 5-year-old at first seemed overwhelmed by the outpouring, quietly working through each scenario with clenched fists and tight lips amid delirious chants of "batkid, batkid." But by the time he reached City Hall to receive a key to the city in front of the biggest crowd of the day, Miles was all smiles.
Though he didn't address the crowd, he raised his fist twice as he was feted with chocolate, an FBI "raid jacket" and a San Francisco Police Department cap. A clothing company donated $10,000 to Miles' family, and San Francisco Mayor Ed Lee proclaimed Nov. 15 to be "Batkid Day Forever."
U.S. Attorney Melinda Haag unveiled an "indictment" charging the Penguin and Riddler with conspiracy as the crowd that stretched for blocks roared.
Speaking at City Hall, Miles' father, Nick Scott, thanked the crowd, organizers and the city for showing his son a good time.
"Miles has always been a fighter," he said. "He fought cancer and beat cancer."
He was diagnosed with leukemia when he was 18 months old. He ended chemotherapy treatments in June and is now in remission.
Miles, who lives in Tulelake in far Northern California, didn't know what was in store for him and thought he was in San Francisco just to get a Batman costume so he could dress like his favorite superhero.
The San Francisco Chronicle newspaper distributed hundreds of copies of special-edition newspapers with the headline "Batkid Saves City."
"This is off-the-hook San Francisco," Police Chief Suhr said.
___
Associated Press writers Channing Joseph and Terry Collins contributed to this report.