Israeli said it avoided striking the Islamic Jihad faction -- a rival of Hamas -- in the attacks. Hamas administers the Gaza Strip.
"In response to the rockets fired from Gaza at Israeli civilians overnight, our forces struck Hamas terror targets in Gaza," the Israel Defense Force posted on Twitter. "Hamas will bear the consequences for attacks against Israeli civilians.
"We remain prepared for various scenarios."
Al Jazeera reported Israel is changing strategy by targeting Hamas sites.
Early Saturday, Hamas allegedly fired at least two rockets toward the Negev Desert city of Beersheba. Israel's Iron Dome air defense system shot down both projectiles and later struck a Hamas military camp, a naval facility and "an underground terror infrastructure," according to a statement.
"Hamas fired tonight, aiming to kill Israeli civilians, and therefore we fired back at their military targets," Lt. Col. Jonathan Conricus, a spokesman for the Israel Defense Forces, told the The Washington Post.
Hamas hasn't claimed responsibility for the attacks, which Israel said came from Hamas launchers.
The Israeli strike was carried out by 10 missiles fired at targets northwest of Gaza City and Beit Lahiya, Palestinian Wafa News Agency said according to The Jerusalem Post
The hostilities began Tuesday when an Islamic Jihad commander in Northern Gaza and his wife were killed in a strike on his bedroom.
Israel blamed the commander, Baha Abu al-Ata, for most of the rocket attacks and other terrorist activity from Gaza in recent months.
Since then, 34 Palestinians have died and Israelis have gone into bomb shelters to protect themselves from rockets.
On Friday, it was revealed that one of the final strikes of the operation killed eight family members in a home, including five children, instead of hitting a supposed vacant military tagret.
An IDF spokesman initially said one of the men killed was Rasmi Abu Malhous, an Islamic Jihad commander. But the man had no affiliation with the militant group, neighbors of the family told media.
Israel's military said it would investigate "harm caused to civilians" from air raids.
Palestinian Islamic Jihad fired 400 rockets and mortars toward southern and central Israel since Tuesday. The Israeli military said the Iron Dome missile defense system intercepted 90 percent of rockets headed toward residential areas and 60 percent landed in open fields.