Secretary of Defense Lloyd Austin said the strikes were in response to recent attacks on US bases in Iraq and Syria by Iranian-backed militia groups.
The US strikes were "separate and distinct from the ongoing conflict between Israel and Hamas," he said in a statement.
Iran did not immediately comment. It is not yet known if there were any casualties from the attacks.