President Hassan Rouhani offered his condolences to victims' families and quickly ordered an investigation into the crash. Similar planes operated by Iranian carriers will be grounded until the probe is complete, he directed.
The plane was based on a relatively obscure Ukrainian design that has been involved in previous Iranian air disasters.
The Sepahan Air regional airliner, bound for the eastern town of Tabas, went down in a residential area shortly after takeoff at 9:20 am from Tehran's Mehrabad airport.
The official IRNA news agency said the plane suffered an engine failure. Whatever the ultimate cause, quick thinking by the pilot may have saved some lives.
More From This Section
"We should be thankful to God that the pilot did all he could to steer the plane away from residential buildings and fortunately did not crash into them. Otherwise, we would have been dealing with a much worse crisis," said Jalal Maleki, spokesman of Tehran's Fire Department.
Known as an IrAn-140 or Iran-140, the twin-engine turboprop is a version of the Antonov An-140 regional plane and is assembled under license in Iran. It can carry up to 52 passengers.
A similar Iranian-made version crashed during a training flight in Isfahan in February 2009, killing five onboard, according to a report by state-run Press TV at the time.
Iranian airlines, including those run by the state, are chronically strapped for cash, rely on aging planes and have a spotty maintenance record.
While some operate Boeing and Airbus models, spare parts for Western-made planes are often hard to come by largely because of sanctions aimed at Iran's nuclear program.