A federal judge in Manhattan on Tuesday ordered the Metropolitan Transportation Authority to display an ad from a pro-Israel group on buses after the agency declined to run it last year.

The group, the American Freedom Defense Initiative, sued the authority in October, saying it had infringed on the group’s First Amendment rights by rejecting the ad. The authority had argued that the ad could be seen as a call to violence against Jews.

The ad shows a man with a scarf across his face next to the words, “Killing Jews is Worship that draws us close to Allah,” attributed to “Hamas MTV.” Below that, it reads: “That’s his Jihad. What’s yours?”

The judge, John G. Koeltl, of United States District Court, ruled that the ad qualified as protected speech and granted a preliminary injunction ordering the transportation authority to run the ad. He said the order would not take effect for 30 days so the agency could consider whether it would appeal the decision.