This past weekend, the Bollywood production company Fox Star Studios released a long-awaited film, “Ae Dil Hai Mushkil,” by Karan Johar, one of India’s leading directors. Johar has made some of Bollywood’s highest-grossing blockbusters, but less than two weeks ago he was pleading with people to watch his new movie. “Over three hundred people in my crew have put their blood, sweat, and tears into my film,” he said in a video statement, clad in black against a black backdrop. Then Johar promised not to work with talent from India’s neighbor, Pakistan, anymore. “I salute the Indian Army,” he reassured his audience.

The moment was astonishing and chilling, the direct result of criticism from the Maharashtra Navnirman Sena (M.N.S.), a right-wing Hindu political party. The party and its supporters were angry that Johar had cast the Pakistani actor Fawad Khan in his film. Cinemas in several states said they would not screen the movie. Even more astonishing was that Khan was already well-known in Indian movies. He made his Bollywood début a couple of years ago, become a heartthrob in India, co-hosted a film-awards show, and, earlier this spring, starred in another Johar film—one of the most popular of the year. What series of events led to Johar vowing not to engage with Pakistani artists?

In the past several years, the cultural collaboration between Pakistan and India has strengthened, with Bollywood stars appearing in commercials aired on Pakistani TV; musicians from both countries collaborating on Coke Studio, a television series featuring live music performances; and Pakistani soap operas gaining a loyal fan base across the border. In 2014, an Indian television channel was launched to air these soap operas. The fandom was large enough that Bollywood started casting Pakistani television stars in movies. Meanwhile, another trend was taking shape in India, a version of nationalism that threatened political dissent. In February, students at Jawaharlal Nehru University, in Delhi, held protests against India’s treatment of Kashmiris, and were met with retaliation by a Hindu-nationalist student group. As the issue widened, police arrested several pro-Kashmir student protesters, even charging one of the leaders with sedition. Government officials of India’s ruling Bharatiya Janata Party (B.J.P.), which is pro-Hindu-nationalist, backed the move, and one leader in particular called for “stringent action” against anyone raising “anti-national slogans,” fuelling the charge against the student protesters. “The B.J.P. discovered for the first time the potency of hypernationalism as a political weapon,” Siddharth Varadarajan, a founding editor of The Wire, an online English publication in India, told me.

A few months later, that hypernationalism was amplified by renewed tensions with Pakistan. During the summer, protests in Kashmir against Indian security forces and Pakistan’s decision to get involved started a crescendo of hostile measures, including an attack on an Indian Army base in Kashmir and a surgical strike by India on Pakistan. The Indian government’s position was firm. “Pakistan is a terrorist state and it should be identified and isolated as such,” India’s home minister, Rajnath Singh, tweeted shortly afterward.

This surge of nationalism quickly spread to the entertainment industry. The M.N.S. used the attack on the Army base to issue a forty-eight-hour deadline to Pakistani artists to “leave India or MNS will push them out.” Right-wing groups like the M.N.S. and Shiv Sena have a “long history of targeting the film industry,” Manishita Dass, who teaches film and global media at Royal Holloway, University of London, told me. Using thugs and violence, these groups have forced the censorship of films they consider anti-national, and recently succeeded in getting a popular Pakistani singer’s concert in India cancelled. But the latest developments mark a dangerous shift. When the M.N.S. announced its threat to Pakistani artists, the B.J.P. largely remained silent, tacitly condoning any measures the extremist party might take. Along with Johar’s video statement came a deal between the M.N.S., Johar, and the Indian Motion Pictures Producers Association, which was brokered by the chief minister of Maharashtra, a B.J.P. member, at his residence. The M.N.S. agreed to let Johar’s movie be released without incident, and Johar and the Producers Association agreed to no longer cast Pakistani actors. Johar would also pay more than a million dollars to the Army Welfare Fund, which helps relatives of soldiers who had been killed in combat. That the entertainment industry could be bullied to such extremes was frightening, but that such a move would be sanctioned by the government signalled a level of legitimacy for the M.N.S. “When bullies appropriate the national flag, as the M.N.S. has sought to do, using the B.J.P.’s own language to score points for itself, they need to be placated and coöpted,” Varadarajan said. “This is what has happened.”

Some actors and producers in Bollywood condemned the M.N.S. and ridiculed the move, while others have agreed not to work with Pakistanis until tensions between the two countries dissipate. One actor, Ajay Devgn, conceded that fear played a role in his decision not to work with Pakistanis. “When it comes to nationalism . . . I stand by the country. When it comes to politics, an industry man gets a little scared,” he said in an interview. Meanwhile, members from the Indian Army reportedly refused to accept Johar’s “penalty” fee, saying that the Army is an apolitical organization and that Johar was exploited for political gain. On social media, viewers praised Johar’s film. The editor of an entertainment magazine noted on Twitter that Khan’s performance in the film “shows us what we are going to miss.”

Culture and cinema have long been a way to thaw the frosty relations between the two countries—one of last year’s most popular Bollywood films was about a Hindu man helping a lost Pakistani girl find her way home. Today, the cultural bridge has been severed by what Dass calls a patriotism that is “defined according to jingoist terms.” Not long after the M.N.S.-enforced ban on Pakistani actors, Pakistan responded by declaring a blanket ban on Indian content on its radio and television. Meanwhile, the tensions between the two countries have worsened. In a recent incident, India expelled an officer from the Pakistani embassy after accusing him of being a spy. Pakistan retaliated in kind.

The ban on Pakistani talent seems like the latest iteration of the cold war between the two South Asian countries. But this row doesn’t reflect their long-standing conflict so much as it casts light on the struggle to define nationalism in India. Johar’s video and his deal with the M.N.S. have set a dangerous precedent. The incident has validated the leap a politician can make from a militant attack to a forceful censorship of the arts. It has left many artists uncertain about what will be considered “anti-Indian.” Varadarajan, the Wire editor, responding to the nationalist sentiment amid the Johar controversy, wrote a “confession” about his relations with Pakistanis, a beautiful ode to some of his friendships with his neighboring country. But, elsewhere, his colleague Sidharth Bhatia was more anxious. “Don’t be surprised if soon, reading Pakistani authors or being Facebook friends with Pakistanis . . . could be declared anti-national,” Bhatia wrote. That a leading democracy could quell such expression seems implausible, but nationalism is a potent force, especially when it’s considered under threat. And, for many, the present is already shocking. “A few years ago, Johar issuing a statement like this would be unthinkable,” Dass said. “Now this is the new normal, and they’ve gotten away with it.”