WENN

Lupita Nyong'o personally reached out to Taylor Swift to win her permission to use hit song Shake It Off in her new zombie comedy Little Monsters.

The Oscar winner became hooked on the 2014 tune after it helped to lift her spirits while working away from home, and so she convinced writer/director Abe Forsythe to let her sing the track onscreen, in her role as kindergarten teacher Miss Caroline, who fights to keep her young students safe from a zombie invasion.

"I was going through a hard time professionally, and I was just in a funk," she explained at the Sundance Film Festival in Utah on Tuesday.

"I was working abroad, and my best friend came to cheer me up. He played Shake It Off on his phone, and we just had a dance party in my bedroom."

However, getting Taylor to sign off on the song license proved to be harder than expected for filmmakers, until Lupita stepped in and penned a personal note to the pop superstar.

"It meant a lot to me that this film had that (song)," Lupita shared. "And so when I heard that they were having a hard time (getting the rights) I wrote Taylor Swift myself and asked her, and told her that story. And she said yes!"

The actress delivers a stripped down version of the single in Little Monsters, performing the track while strumming a ukulele to keep her class calm.

The film also stars Beauty and the Beast's Josh Gad and Alien: Covenant actor Alexander England, who vie for Miss Caroline's affections while they all fight for survival amid a zombie outbreak, and it appears Taylor's gamble on allowing Shake It Off to be used in the project has paid off – Little Monsters earned a string of top reviews following its Sundance debut, and has since been picked up for distribution by bosses at streaming service Hulu, in partnership with production officials at Neon.