The attacks came after Iran targeted commercial ships and American service personnel in the Middle East.