Ionita (Mihai Comanoiu), left, and his father and mentor, Costandin (Teodor Corban), are tracking the escaped gypsy slave Carfin (Cuzin Toma), right, in “Aferim!” (Big World Pictures)

It would be hard to single out the most hateful character in the Romanian western “Aferim!” (Translation: “Bravo!”) Maybe the vile aristocrat who beats his wife or the bully of a constable who will punch, kick and threaten just about anyone in order to retrieve a runaway slave. The most shocking, though, is surely the creaky old priest, who rattles off stereotypical racist caricatures as if they’re Bible verses, and gets especially fanciful with tales of Jews and the Roma. “Gypsies get beaten,” he explains matter-of-factly. “Gypsies must be slaves.”

Welcome to 19th-century Wallachia, which today is part of Romania. The man at the center of Radu Jude’s brilliantly biting dark comedy is Costandin (Teodor Corban), that lawless lawman in search of the slave Carfin (Cuzin Toma). Along for the ride is Costandin’s son and apprentice, Ionita (Mihai Comanoiu), who has a little more of a conscience than his dad, but not much.

Most of the movie consists of the pair riding on horseback across rivers and through forests as they track their prey. All the while, Costandin is a bottomless fount of aphorisms, many of them offensive and some nonsensical. He delivers these pearls to his son like a cherished inheritance, demonstrating how hatred, not to mention idiocy, can become a legacy. Costandin may be despicable, but he’s also a tiny part of an inhumane system. For evidence, look no further than the way he treats the travelers who cross his path: Costandin berates them, or they berate him, depending on each person’s standing in this class-obsessed society.

Shot in black and white with fade-out transitions, the movie harks back to classic westerns. But it’s also distinctly modern. The Romanian director, who wrote the script with Florin Lazarescu, made the movie as a critique, not just of 19th-century mores but of today’s. And what a critique it is. Much of the humor derives from how despicable these characters can be, and Jude doesn’t so much push the envelope as turn it into a paper airplane and let it fly. It’s no coincidence that Costandin and Ionita stumble upon — and delight in — a Punch and Judy puppet show.

Aside from Costandin’s plethora of proverbs, his most distinguishing feature is how easily he justifies his actions — and who doesn’t know people like that? “I treat people kindly,” he argues at one point, not long before he and his son stumble on a group of massacred travelers. Costandin wants to high-tail it out of there as quickly as possible in case the perpetrators remain nearby, but as they ride on, Ionita exclaims that one person may still be alive. “What are we, surgeons?” his father responds.

But don’t worry, there’s an adage for that, too.

“Fear is shameful, but healthy,” Costandin reasons. “It is God’s gift.” The priest would probably agree.

Unrated. At the Angelika Pop-Up at Union Market. Contains strong language, sexual situations and disturbing violence. In Romanian, Turkish and Romany with subtitles. 108 minutes.