Director Jafar Panahi takes the wheel of a Tehran cab in “Taxi,” carrying passengers such as his real-life niece, Hana Saeidi, left, around Iran’s capital city. (Kino Lorber)

Jafar Panahi can’t be stopped from making movies.

In 2010, the acclaimed Iranian director was sentenced by his government to six years in prison — along with a 20-year ban on moviemaking — for producing anti-government propaganda. Despite that, he has kept going, making three features since his release after a mere three months, beginning with the cheekily titled “This Is Not a Film” in 2011.

“Taxi” is his latest effort, and it’s the first time we’ve seen Panahi venture outside his home in a while. In the film, the director plays a version of himself: a former filmmaker forced to become a somewhat inept cab driver in Tehran, where he picks up and drops off people around Iran’s capital.

At first glance, the movie feels like a documentary, with dashboard cameras capturing everyday encounters: Two passengers debate whether thieves should be sentenced to death; a man who recognizes Panahi asks the director about his new line of work. But soon, more unconventional passengers replace the run-of-the-mill riders. An inconsolable woman and her bleeding, possibly dying husband get into the taxi following a bike accident and ask to be taken to the hospital. They need a phone so that the man can record his will, ensuring that his wife instead of his brothers will inherit his possessions. Shortly thereafter, two superstitious women carrying a bowl with a pair of goldfish get into the car demanding to be taken to a spring. If they don’t set their fish free by noon, they say, the women will die.

Panahi’s most entertaining passenger is his young, chatty niece (played by his real-life niece, Hana Saeidi). Here, she’s an aspiring filmmaker with a class assignment to make a documentary that her country’s censors would approve of, but all the rules keep thwarting her. If she portrays a woman without a hijab or a kid picking up money off the ground or a man without the name of an Islamic saint, she risks violating state guidelines, including the vague directive not to depict “sordid realism.”

Hana, like all of the other passengers, sheds light on the way Iranians submit to or flout the rules of an oppressive regime. Some of the characters make more of an impression than others, and the vignettes aren’t always entirely thrilling or well-acted. But Panahi’s movie remains a political coup considering his significant constraints.

Despite everything, Panahi projects a light, easygoing presence, cruising around town with a smile even when his character doesn’t know where he’s going. He looks like he’s having a wonderful time, but a sordid reality is never far off: Panahi’s films are acts of defiance, and each one could be his last.

Unrated. At Landmark’s E Street Cinema. Contains brief strong language. In Persian with subtitles. 82 minutes.