Iran’s most serious unrest in years appears to be losing momentum, but the violence behind the protests is intensifying and the risk of wider confrontation remains high, according to a Middle East analyst.