Mogul Mowgli director Bassam Tariq has said the film’s leading actor Riz Ahmed “stole” his heart the first time they met, despite his initial reservations.

Tariq recruited the Four Lions star for his debut narrative feature, after working mainly in documentary-making.

Ahmed stars as a British-Pakistani rapper called Zed on the cusp of his first world tour, who is struck down by an illness that threatens to derail his burgeoning career.

Tariq, who is from Queens in New York City, said he bonded with London-born Ahmed, who produces hip hop as Riz MC, over their shared Pakistani and Muslim heritage.

He told the PA news agency: “Riz saw my documentary These Birds Walk and I had only seen Four Lions the time we first met. He had seen the film and was like, ‘I would love to meet him’.

“He met my co-director first, Omar Mullick, who is a really close friend of both of ours. Omar was like, ‘You should meet this Riz guy, he’s actually quite cool’.

“I was like, ‘Really. I don’t know. I liked him in the film but I don’t know if I do this actor thing.’

Riz Ahmed as Zed (Rob Youngson/Pulse Films/BBC/PA)

“So then I ended up meeting him and he just really stole my heart. After that we just stayed in touch.

“We saw so many parallels in our lives, even though I grew up in Queens and he grew up in London, there are so many connections.

“I was like, ‘Oh my God, Wembley is like Queens – this is crazy’. A working class kid just like me.

“We just had a lot of these different connections. And we knew we wanted to work on something together. It was just a question of, ‘How are we really going to do this?’”

Tariq has said the film, which screened at the BFI London Film Festival, emerged from conversations they had about their shared experience.

Riz Ahmed is also a rapper (Rob Youngson/Pulse Films/BBC/PA)

Speaking about the tension they both felt because of their backgrounds, he said: “As an artist, you don’t want to be pigeonholed and there is this fear of being pigeonholed.

“Somebody like Zed has this fear of becoming irrelevant, because there is only one spot for somebody like him.

“That’s this general fear that we have. I have that fear. I think it is only recently that I have started to surrender to the fact that I am only who I can be.

“I think that is one of those points of tension, of how we are telling the story.”

Talking about their collaboration, he added: “There is really no map for us. That’s kind of what it is.

“So we looked to a lot of literature to help us. We looked at paintings. We looked at mogul miniatures.

“We looked at the artforms we did master, because cinema is still quite new.

“We are all still learning, what is this really? Maybe it’s only been around for 200 years, while painting and poetry has been around for a millenia.

“Now we are learning how to craft this stuff and take from things we have already mastered from our tradition.”

Mogul Mowgli is released in the UK and Ireland on October 30.