(3 stars)

Iran’s official Oscar submission, “A Hero” centers on Rahim Soltani (Amir Jadidi), a divorced calligrapher/sign painter in Shiraz who is serving a jail sentence for his failure to pay a creditor 150,000 toman (about $35). Yes, debtor’s prison is still a thing, and the story — by Golden Globe-winning writer-director Asghar Farhadi (“A Separation”) — isn’t set in the Middle Ages.

There are other aspects of the Iranian social order — such as a husband’s right to treat his wife like property, and her property as his — that inform the action of this Dostoyevskian tale.

The story begins during a two-day home leave that has been granted to Rahim, who uses the time to visit his girlfriend Farkhondeh (Sahar Goldust), who has found an abandoned purse on the street containing several gold coins, which Rahim hopes to exchange for cash toward his debt. But when he discovers that the money won’t be enough, he hits on a better plan: Find the owner of the purse and return the money, trusting that this act of decency will somehow be converted into currency — either the cold, hard kind, or some form of social credit that will benefit him.

It briefly works.

Signs go up, and a woman shows up to collect the purse from Rahim’s sister (Maryam Shahdaei). Word gets around of the protagonist’s selflessness, and TV cameras roll, drummed up by prison officials, hoping to use the story to distract from bad publicity about a recent inmate suicide. A charitable organization raises a bunch of money for Rahim — only about half his debt, as it turns out — and offers him a job to help pay off the rest.

But only briefly.

Doubts arise about Rahim’s story, which has been embellished with harmless white lies, such as that he found the purse, not Farkhondeh. And the man to whom he owes money (Mohsen Tanabandeh), a relative of Rahim’s ex-wife, doesn’t want to settle for partial payment. It also doesn’t help that Rahim has a slippery past relationship with the truth: He omitted the fact that his original debt was to a loan shark, not a bank. And as embodied by Jadidi, Rahim wears an ever-present, nervous half-smile that occasionally feels inappropriate to the moment at hand, making him seem devious or, at times, deceptive.

When an official of the charity insists on meeting the owner of the purse — whose identity is unknown, and who may herself have lied about losing it — Rahim enlists Farkhondeh to impersonate the purse’s owner.

It’s a tiny bit of artifice in service of a larger truth, but things quickly spin out of control, leading to fisticuffs, and a viral video that is used as leverage against Rahim. Farhadi seems to be critiquing social media/cancel culture as a tool of coercion — a problem certainly not unique to Iran — but also aspects of Iranian society itself. The woman who shows up to collect the purse, for instance, is shifty because, she says, she’s afraid her husband will take her money.

It’s a tangled web, and not entirely one woven from deception. To a large degree, Rahim’s hands are tied. How exactly is he to get out of debt while he’s in prison? And yet, like a sheep, he returns at the appointed hour after his leave expires. In some ways, his life behind bars seems less precarious than life on the outside.

When Rahim’s young son (Saleh Karimai), who has a stammer, is exploited for public sympathy, stating hesitantly — yet, more or less, honestly — for a cellphone video that his father didn’t lie, it’s only Rahim who objects. The hero of “A Hero” is a good and decent man in a small tragedy not of his making. (His partner ran off with the loan money.)

The movie takes place in Iran, yet it’s really situated in the crack of daylight that separates truth from a lie. It’s a tight squeeze, Farhadi seems to say, and one whose pinch this tragedy of the everyday makes us feel, acutely.

PG-13. At area theaters, available Jan. 21 on Amazon. Contains some mature thematic elements, brief crude language and scuffling.

In Farsi with subtitles. 127 minutes.