System purely defensive, was put in place after discussions with Iraqi government, says US.
It adds to 24 hours of tension in Iraq that coincided with American Independence Day. There were claims the US had deployed a C-RAM system to confront threats to its embassy and other facilities.
The incident took place after a number of rocket attacks near the US Embassy in Baghdad and other US military sites in recent weeks.
Two rockets fired towards southern Israel on Friday night just a day after Hamas warned Jerusalem against annexation.
Reports say that this is the first attack since Iraq had its new prime minister sworn in on May 7.
The constant trickle of rockets is a message to the US, during the period of US-Iraq strategic dialogue, designed to show that pro-Iranian groups control Iraq and can do as they please.
This is the first rocket fired from Gaza since May 6.
NASA astronauts Doug Hurley and Bob Behnken have flown into space aboard the Crew Dragon capsule, and are bound for the International Space Station.
There was no immediate claim of responsibility.
The rocket fired from Gaza was the first in about 40 days.