Not even a 5-year-old boy with cancer could persuade egotistical actor Andrew Garfield to be a presenter at the Academy Awards.

The “Spider-Man” star was supposed to take the stage Sunday with Miles Scott, who has come to be known as “Batkid” after the city of San Francisco let him play superhero there.

The Academy of Motion Picture Arts & Sciences had arranged with the Make-A-Wish Foundation to further make Miles’ dreams come true.

“The academy was going to make him an official superhero during the Oscar ceremony. Andrew Garfield was going to appoint him ‘Batkid.’ But, in the middle of the dress rehearsal, Garfield decided he didn’t like his lines,” said a well-placed source.

“Garfield refused to go by the script. He came up with his own lines. The producers felt that Garfield’s [rewrites] were not appropriate. Garfield had a tantrum. He stormed off. Miles and his family, who were at the rehearsal, were devastated.”

The producers decided to cut the superhero initiation, but they paid for Miles to go to Disneyland.

“Garfield was such a spoiled brat that he didn’t even want to be a presenter,” said my source. The academy had to call “Captain America” star Chris Evans to sub at the last minute.