The US spent weeks establishing a massive military presence in the Middle East as Washington threatened Tehran with military action.