JERUSALEM -- Israel on Tuesday launched its largest offensive in the Gaza Strip in nearly two years, carrying out a blistering aerial assault on scores of targets and killing 25 people in what officials called an open-ended operation aimed at ending weeks of heavy rocket fire. As Gaza militants unleashed salvos on cities including Jerusalem and Tel Aviv, Israel mobilized forces along the border for a possible ground invasion.
The offensive set off the heaviest fighting between Israel and the Islamic militant group Hamas since an eight-day battle in November 2012. The militants fired about 160 rockets at Israel, including a strike that reached the northern city of Hadera for the first time, while Israel said it attacked more than 150 sites across Gaza.
Palestinian medics reported at least 25 dead, including six killed in an airstrike that flattened an apartment building in southern Gaza and set off widespread panic.
Prime Minister Benjamin Netanyahu said continued rocket attacks on Israeli communities would not be tolerated.
"Therefore I have ordered the military to significantly broaden its operation against Hamas terrorists and against the other terrorist groups inside Gaza," he said on national TV. "I call on you to display patience because this operation could take time."
Israel and Hamas are bitter enemies that have engaged in numerous rounds of fighting over the years. But until recently, they had been observing a truce that ended the previous hostilities in 2012.
Tensions have been rising since Palestinian militants kidnapped three Israeli teenagers in the West Bank on June 12. Accusing Hamas of being behind the abductions, Israel launched a crackdown on the group's members in the West Bank and arrested hundreds of people. Hamas, which controls Gaza, responded by stepping up rocket fire.
The situation deteriorated last week after the bodies of the Israeli youths were found, and a Palestinian teenager in Jerusalem was abducted and burned to death in what Palestinians believe was a revenge attack. Six Jewish Israelis have been arrested in the killing, and the rocket fire from Gaza has increased in recent days.
The fighting raged throughout the day. In its fiercest attack, an airstrike flattened the home of a Hamas militant in the southern Gaza town of Khan Younis, reducing the concrete structure into a smoldering pile of rubble.
Panicked residents fled, shouting "God is great." Some had bloody faces, and crying mothers held small children as they ran away. Screaming Palestinians took away motionless bodies. Palestinian medical officials said six people, including two children, were killed. Israel's military said it had called the home shortly before the airstrike to warn civilians to leave, something it has done in past fighting as well.
The normally bustling streets of Gaza City were deserted late Tuesday. Fearing an Israeli ground operation, many residents from areas near the border moved to stay with relatives living deeper inside Gaza.
In southern Israel, hundreds of thousands of citizens were ordered to stay close to home because of the rockets. Israeli streets were also quieter in Tel Aviv and Jerusalem after attempted rocket strikes set off air-raid sirens in Israel's two largest cities. The Jerusalem municipality said it was opening special bomb shelters.
Militants twice fired rockets at Tel Aviv, Israel's commercial capital, sending people scurrying for cover. Both were intercepted by the "Iron Dome" rocket defense system, with the second shown on live TV, as a winding plume of smoke followed the interceptor into the black skies, culminating with a flash.
Late Tuesday, Hamas said it fired four rockets toward Jerusalem, and two distant booms were heard from the city's center. Three rockets landed in the Jerusalem area, officials said, and police said there were no injuries.
The Israeli military said one rocket exploded in the northern Israeli city of Hadera, about 100 kilometers (60 miles) from Gaza, in the farthest distance a rocket from Gaza has reached so far. It caused no injuries, the army added. With its new reach, Hamas' rockets now have an estimated 5 million people -- more than half of Israel's population -- in range.
Hamas said it had used a new rocket called the R-160 after one of its leaders, Abdel Rantisi, who was killed last decade.
In other violence, the Israeli military said it foiled Gaza militants who tried to infiltrate a military base in southern Israel by sea. Lt. Col. Peter Lerner, a military spokesman, said four attackers came ashore and attacked the base with grenades and automatic rifles before they were killed. An Israeli soldier was slightly wounded.
As Israel built up forces along the border, the government authorized the army to activate up to 40,000 reservists. The army said that about 1,000 soldiers were immediately activated, in addition to an earlier group of 1,500 reservists called into action.
"If we need to go inside in a ground operation, then we will do it. These things are on the table. These options exist. We will not stop anything until the rocket firing ends," said Yitzhak Aharonovitch, the minister for internal security and a member of Netanyahu's inner Security Cabinet. Israel's last ground offensive was in 2009.
Asked by Channel 2 TV if there were any efforts underway to reach a cease-fire, he said: "Not now."
The U.S. State Department condemned the rocket fire on Israeli civilians, defended Israel's right to protect itself, and said it hoped Israel's "strong message" would deter further attacks. "But certainly, our preference is to de-escalate the situation on the ground," spokeswoman Jen Psaki said.
Israel and Hamas, which is sworn to the destruction of the Jewish state, agreed to an Egyptian-brokered cease-fire that ended the last round of fighting in late 2012.
In Gaza, Abu Obeida, a masked spokesman for Hamas' military wing, accused Israel of violating that agreement and demanded a halt to the airstrikes, its recent crackdown in the West Bank and its opposition to a Palestinian unity government that is backed by Hamas.
"In the face of this aggression, we affirm that the Zionist enemy should not dream of calm and stability," he said.
Hamas, however, is far weaker than in 2012. At the time, Egypt was governed by the Muslim Brotherhood, Hamas' close ally. Following a military coup in 2013, Egypt's new government is hostile to Hamas and has closed a network of smuggling tunnels used by the group as an economic lifeline.
Hamas seized control of Gaza in 2007 from the rival forces of President Mahmoud Abbas. But facing international isolation and an economic crisis, Hamas last month agreed to back a new unity government with Abbas.
Abbas, however, has little real influence over Gaza. Hamas, with an arsenal of thousands of rockets, remains the dominant power there. Smaller and more radical forces are also involved in rocket fire from Gaza.
U.N. Secretary-General Ban Ki-moon condemned the multiple rocket attacks on Israel from Gaza and demanded an immediate halt to the attacks, U.N. spokesman Stephane Dujarric said. Arab League Chief Nabil Elaraby called for an emergency session of the U.N. Security Council to stop the violence.