Humorous ads for a documentary film that aims to promote understanding and tolerance of Muslims went up in New York subways on 7 March, after the movie's production company won a legal battle with the city's transit authority.

"The Ugly Truth About Muslims: Muslims have great frittata recipes," reads one of the ads created by comedians Negin Farsad and Dean Obeidallah who are using humour to break down stereotypes and promote their documentary The Muslims Are Coming! The advertisements debuted after a federal court in Manhattan ruled in October that being Muslim was a religious, not a political, identity. The Metropolitan Transportation Authority (MTA) has a policy prohibiting political speech in ads on public transportation.

The ad campaign strives to combat negative perceptions of Muslims as the world grapples with accommodating millions of people fleeing Middle East violence and abject poverty in other parts of Africa. Obeidallah said he and Farsad had intended for the ads to go up in 2014 to promote their film.

"It's an outgrowth of the film we made called the Muslims are Coming! which we made a few years ago. It's a comedy-doc. We went to the South and the West, did a lot of free shows, just to meet people and answer their questions about Muslims. This whole campaign for the posters was an outgrowth of that in November 2014. Here we are 15 months later and a federal lawsuit later and finally these funny posters are going up that were tied to our film in which it shows Muslims being funny and in a different light. That's all it was about."

Farsad added: "All we wanted to do was put up this 'Fighting Bigotry with Delightful Posters' campaign where we were spreading hilarious messages about Muslims while promoting 'The Muslims Are Coming!' It was supposed to be no big deal. And the MTA decided to ban the poster campaign, citing political speech."

"So we decided to turn our 'Fighting Bigotry with Delightful Posters' campaign into fighting 'Fighting Bigotry with a Delightful Lawsuit' campaign. We sued the MTA," he said.

In June 2015, New York-based Vaguely Qualified Productions, the company behind the documentary, and the Muslim Advocates filed a lawsuit against the transit authority after it withdrew prior approval for the ads. A federal judge had already allowed the transit authority to reject an ad from the American Freedom Defense Initiative after the agency adopted a policy against political advertising.

Farsad said: "We hope that these posters will still promote the movie and still get more eyeballs on the movie. The point of the movie is just to show Muslims in a positive light, to build a bridge with mainstream Americans. Muslim-Americans can be super hilarious and that's kind of just what we want to show people. Right now, the only message that we have about Muslims is that they are terrorists, they should be in registries, probably we shouldn't allow them in. It's just, right now it's crazy! So I think having a counter-message to that, that Muslims can be sort of delightful and fun and ridiculous, is really necessary because otherwise we are going to go off the deep end with this."

The ads, which cost about $20,000 (£14,000) will be posted in about 144 subway stations, according to Farsad and Obeidallah. The film The Muslims Are Coming! can be viewed on Amazon, iTunes and Google Play.