Iran temporarily closed its airspace as tensions with the US escalated amid a violent crackdown on nationwide protests.