Iranian director Asghar Farhadi has recently captured media attention for his decision not to attend the Oscar ceremony in response to President Trump’s travel ban on seven predominantly Muslim countries; one hopes that the controversy will increase public interest in seeing his film, which has been nominated as Best Foreign-Language Film and is a strong contender to win, though the fact that his earlier picture, “A Separation,” took the prize in 2012 probably works against it.

The film takes its title from the fact that the couple at its center—Emad (Shahab Hosseini), a Tehran teacher, and his wife Rana (Taraneh Alidoosti)—are preparing an amateur production of Arthur Miller’s “Death of a Salesman” in which they play Willy and Linda Loman. They have to deal with state censors and a fractious cast, but face a more immediate problem when their apartment building starts to shuffle and crack and the residents are compelled to evacuate. It seems good fortune when Babak (Babak Karimi), a member of their acting troupe, offers them a place he has for rent.

There are, however, drawbacks, the most notable being that the previous tenant has left behind many of her belongings in one of the rooms, having promised to retrieve them when she finds a new place. The reason for her departure, it’s eventually revealed, is that she is a lady who had many male visitors, a fact that gave the place an unsavory reputation. (Babak, it appears, was one of her regulars.) Not all of her customers, moreover, are aware that she’s no longer the tenant, and one evening Rana buzzes the door open, believing that she’s letting Emad in; it turns out to be someone else, however, and the man attacks her.

Rana is understandably traumatized, and Emad is frustrated by his inability to help her. Though her injuries are dealt with in the hospital, she vacillates between neediness and standoffishness with him, and refuses to report the assault to the authorities, knowing that she would be shamed rather than treated as a victim. (The neighbors, by and large, concur.) Frustrated, Emad turns sleuth himself. The perpetrator has, in his haste to escape, apparently left his truck behind, and Emad is able to identify it and, despite obstacles, use it to trap the culprit. The question is what to do with him, and the final sequence of the film, with its shifts of perspective, proves as lacerating a portrait of marriage and family in Iranian society as the one Farhadi presented in “A Separation,” though of a very different sort.

The film uses Miller’s play to exhibit the stark differences between the U.S. and Iran—a character in the play is supposed to appear in skimpy dress, but in this performance must, incongruously, be fully clothed to meet the censors’ demands—but also to point up the observations about relationships between men and women that both a mid-century American drama and present-day Iranian practice share. Willy and Emad both are revealed as self-centered, demanding to be seen as strong heads of household, capable of handling whatever reverses might arise in a virile, definitive way. By contrast both wives, Linda and Rana, are the ones who suffer—in different ways, of course—but they are the ones who ultimately must endure and pick up the pieces, however imperfectly. The presence of “Death of a Salesman,” which at first might simply seem just a cheeky cross-cultural joke, by the close takes on a degree of surprising significance.

The performances are all excellent, with Hosseini gradually transformed from genial and sympathetic to furiously obsessive, while Alidoosti more quietly conveys the profound resignation of a woman living under strictures we can only imagine, but with a vein of steely anger beneath. The supporting cast is also excellent, with Karimi conveying the hint of shiftiness appropriate to Babak and Farid Sajjadihosseni bringing remarkable depth to the figure that provides a skewered closure to the tale. With its subtle nuances and shifts, his is a turn that might remind you of the quality Peter Lorre managed to endow his character with in Fritz Lang’s “M.”

Keyvan Moghadam’s production design and Hossein Jafarian’s cinematography provide the necessary degree of realism, as well as more than a bit of unobtrusive artistry, but ultimately “The Salesman” is primarily a showcase for Farhadi and his actors—and they make the film as emotionally wrenching an experience as Miller’s masterpiece, even if it demands a degree of patience as it leads you to a shattering conclusion.