Israel's army carried out at least two air strikes on the Gaza Strip on Saturday, an AFP journalist reported, after barrages of rockets were fired from the Palestinian territory into Israel.
The Israeli military said it had launched air strikes into Gaza, where witnesses reported hearing heavy explosions, with at least two dead.
In another incident, Israeli sources said five Palestinians were killed in the town of Sderot and homes had been set on fire.
More than 5,000 rockets had been fired so far from the Gaza Strip, the armed wing of Hamas which controls the blockaded coastal enclave said.
In Gaza, people rushed to buy supplies in anticipation of days of conflict ahead. Some evacuated their homes and headed for shelters.
"We are afraid," Palestinian woman, Amal Abu Daqqa, told Reuters as she left her house in Khan Younis.
Others in Gaza expressed disbelief at the infiltration into Israel. "It is like a dream. I still can't believe it," said one Gaza shopkeeper.
Meanwhile in retaliation, the Hamas launched an attack on Israel, killing 22 people in a surprise assault that combined gunmen penetrating into Israeli towns with a barrage of rockets fired from the Gaza Strip.
Hamas military commander Mohammad Deif announced the start of the operation in a broadcast on Hamas media, calling on Palestinians everywhere to fight.
"This is the day of the greatest battle to end the last occupation on earth," he said, adding that 5,000 rockets had been launched. The last major flare-up between Israel and Hamas was a 10-day war in 2021.
Israel said the Iran-backed group had declared war as its army confirmed fighting with fighters in several Israeli towns and military bases near Gaza.
"Our enemy will pay a price the type of which it has never known," Netanyahu said. "We are in a war and we will win it."
At least 22 Israelis were killed in the attack so far with more than 250 wounded, Israel's ambulance service said, but added that the toll was expected to rise.
The attack marked an unprecedented infiltration by an unknown number of Hamas gunmen into Israel from Gaza, and one of the most serious escalations in the Israeli-Palestinian conflict in years.
Israeli media reported gunbattles between bands of Palestinian fighters and security forces in towns in southern Israel. Israel's police chief said there were "21 active scenes" in southern Israel, indicating the extent of the attack.
In May, Israel launched an offensive against Palestinian Islamic Jihad in the Gaza Strip, triggering a five-day war between the Israeli army, Islamic Jihad and other armed groups in the territory that claimed the lives of 34 Palestinians and one Israeli woman.
The launches came after weeks of heightened tensions along Israel's volatile border with Gaza, and heavy fighting in the Israeli-occupied West Bank.
Backdrop of surging violence
The escalation comes against a backdrop of surging violence between Israel and Palestinian fighters in the West Bank, which together with the Gaza Strip is part of the territories where Palestinians have long sought to establish a state.
It also comes at a time of political upheaval in Israel, which has been riven by deep divisions over moves to overhaul the judiciary, and as Washington works to strike a deal that would normalise ties between Israel and Saudi Arabia.
The Iran-backed Lebanese group Hezbollah said the operation was a "decisive response to Israel's continued occupation and a message to those seeking normalization with Israel."
An adviser to Iran's Supreme Leader Ali Khamenei congratulated Palestinian fighters for the attack.
Hamas media displayed videos of what it said were bodies of Israeli soldiers brought into Gaza by fighters, and Palestinian gunmen inside Israeli homes and touring an Israeli town in jeeps reportedly been driven into Israel by the attackers.
Reuters was not immediately able to verify the footage. Hamas media also circulated video footage apparently showing a destroyed Israeli tank.
In Gaza, the roar of rocket launches could be heard and residents reported armed clashes along the separation fence with Israel, near the southern town of Khan Younis, and said they had seen significant movement of armed fighters.
Palestinians in Gaza were bracing for Israel's response. The attack came a day after Israel marked the 50th anniversary of the 1973 war that brought the country to the verge of catastrophic defeat in a surprise attack by Syria and Egypt.