The Israeli air force hit the Gaza Strip's Hamas rulers early on Wednesday after Palestinians fired at southern Israel, the military said.
Late on Tuesday, the military said that an undefined "projectile" was fired from Gaza towards southern Israel.
A spokeswoman told AFP that it was "very probably" a rocket but that it was not clear where it hit.
Palestinians in the coastal territory have fired both rockets and mortar rounds into Israel over the past week amid anger over US President Donald Trump's recognition of Jerusalem as its capital.
"In response to the projectile fired from the Gaza Strip at Israel earlier, the Israel air force targeted a Hamas military compound in the southern Gaza Strip," the army said on Wednesday.
There were no reports of casualties on either side.
Gaza security officials said that aircraft hit a Hamas naval base west of the city of Khan Yunis and open land nearby.
Trump's announcement last Wednesday has sparked protests across the Palestinian territories, with four people killed and hundreds wounded in clashes or Israeli air strikes so far.