Do you need another reason to be mad about the Oscar nominations? Well here’s one, expressed as tradition demands in the form of a hashtag: #WhataboutAferim! “Aferim!” — the title translates more or less as “Attaboy!” — is Radu Jude’s sublime new feature, a funny and brutal costume drama with a potent contemporary kick. Officially submitted for consideration as Romania’s official entry in the best foreign-language film sweepstakes, it was omitted from the final list of five nominees.

A shocking slight, but maybe not all that surprising. Romania, a small country on the fringe of Europe, has a long history of being trampled, disrespected and ignored by the world’s great powers. Why should Hollywood be an exception? Marginality is part of the national identity and very much a theme in the recent flowering of Romanian cinema. Persistent unluckiness, low self-esteem and compensatory pomposity define the comic universe of “The Treasure,” Corneliu Porumboiu’s most recent film, for instance.

That movie, which opened in New York a few weeks ago, might be described as a perverse folk tale set in the present day. Its dry, wry minimalism will be familiar to devotees of the Romanian New Wave. Mr. Jude, while he shares with his contemporaries an unsentimental interest in human folly and failure, departs from the naturalism that has been their collective signature for the last decade. Shot in richly toned, wide-screen black and white, “Aferim!” looks like an elegant exercise in period playacting. But it casts a fierce, revisionist eye on the past, finding the cruelty and prejudice that lie beneath the pageantry.

It’s 1835, in the principality of Walachia, a northern region of what is not yet Romania that resembles the territory of a classic western. A lawman named Constandin (Teodor Corban) and his deputy, Ionita (Mihai Comanoiu) — who is also his son — ride through broad mountain valleys and sun-dappled forests on horseback, looking for a fugitive. They travel through what feels very much like a half-civilized stretch of frontier, encountering a motley collection of bandits, farmers, stagecoach drivers and talkative oddballs. One of these is a priest whose godly wisdom consists of a hair-raising litany of ethnic and religious hatreds. “Gypsies,” he says, are technically human, though as descendants of Ham they are cursed with servitude and backwardness. Don’t get him started on Jews.