SÃO PAULO, Brazil — Few movies have touched a nerve in Brazil in recent years like “Aquarius.” Starring Sonia Braga as a marijuana-smoking grandmother who clashes with real estate developers, the film has won prizes in festivals from Amsterdam to Sydney, Australia. Brazilian audiences stand to applaud it in theaters. Many here saw “Aquarius” as a shoo-in to represent the country at the Academy Awards.

But this month, the Brazilian government’s Oscar committee decided otherwise, rejecting it as the nation’s candidate for best foreign-language film and unleashing a fierce debate over the dividing line between art and politics.

The committee’s choice had nothing to do with the film’s artistic merits, critics contend. To the contrary, they condemn the decision as a form of political retaliation, made solely because of the cast and crew’s public distaste for Brazil’s new president, Michel Temer.

During a protest in May at the Cannes Film Festival, members of the cast and crew of “Aquarius” held placards denouncing the impeachment process that ousted Brazil’s first female president and catapulted Mr. Temer, her more conservative rival, into power.