* Fighting continues into second day
* Egypt, U.N., seeking ceasefire
* Israeli minister says Israel not eager for new Gaza war (Adds Israeli security cabinet, paragraph 12)
GAZA/SDEROT, Israel, Aug 9 (Reuters) - Israeli aircraft struck more than 150 targets in Gaza on Wednesday night and early Thursday, and Palestinian militants fired scores of rockets including a long-range missile deep into Israel, escalating fighting despite talks on a truce to avert an all-out conflict.
After the long-range Palestinian missile attack, the first of its kind since a 2014 war, Israeli air strikes resumed on Thursday afternoon, flattening a multi-storey building that the Israeli military described as a Hamas headquarters.
Israel has fought three wars in the past decade with Hamas, the Islamist group that controls the Gaza strip. A surge in cross border rocket and air strikes in recent weeks have prompted the United Nations and Egypt to try to broker a truce to prevent another one.
A pregnant Palestinian woman and her 18-month-old child were killed in the Israeli attacks overnight, as was a Hamas militant, local medical officials said. Hundreds of people took part in the funeral for the woman and child on Thursday.
The Israeli military said seven people were wounded by Palestinian rockets and mortars that hit southern Israel across the border.
Ambulance sirens echoed through the night in Gaza, where families huddled at home as powerful explosions thundered through the strip. Across the border rocket warning sirens sounded almost non-stop from sunset on Wednesday in Israeli towns and villages where residents sheltered in bunkers.
The Israeli military said its aircraft had struck more than 150 Hamas targets overnight, while more than 180 Palestinian rockets and mortars hit southern Israel.
Egypt and the United Nations are trying to mediate a truce to prevent the escalation in fighting turning into another all-out war over Gaza, a narrow strip of land that is home to 2 million Palestinians, mainly stateless descendants of people who fled or were driven from Israel in war at its founding in 1948.
The long-range missile fired on Thursday was the first of its kind since the 2014 war. Twenty-five miles from the border, air raid sirens rang out in Israel's main southern city Beersheba. Israeli Army Radio said militants had fired a Grad missile capable of reaching Israel's heartland. Israeli Police said they found its remnants in an open area on the outskirts of the city of 200,000 people and that no one was hurt.
Israel responded by hitting the multi-storey building, first with small bombs apparently so that people would evacuate, then flattening it to the ground with a huge blast that shook the city and raised clouds of dust and smoke.
Residents said the building had served mainly as a cultural centre. Local health officials said 18 bystanders were wounded outside of the building by the blast. Hamas denied using the facility.
Israeli Prime Minister Benjamin Netanyahu convened his security cabinet late into the night on Thursday. A statement issued by his office said the forum instructed the military to "keep acting with force against the terrorists".
Israel captured Gaza in a 1967 war but withdrew in 2005, while holding onto most of the separate West Bank, where Palestinians have limited self-rule. For more than a decade Gaza has been controlled by Hamas under an Israeli-Egyptian blockade that has collapsed its economy, creating what the World Bank has described as a humanitarian crisis with shortages of water, electricity and medicine.
Israel says it has no choice but to enforce its blockade to defend itself against Hamas, which calls for Israel's destruction and has used Gaza as a base for missile attacks.
Earlier on Thursday, a Palestinian official said armed factions in Gaza were prepared to halt their rocket attacks on southern Israel if the Israeli military stopped its air strikes.
"Factions of the resistance consider this round of escalation over as far as we are concerned, and the continuation of calm depends on the behaviour of the occupation," the Palestinian official said.
The official, at a command centre used by armed groups in Gaza, said they had been "responding to crimes" by Israel - a reference to the killing on Tuesday, in disputed circumstances, of two Hamas gunmen.
Yuval Steinitz, a member of Netanyahu's security cabinet, told Israel Radio earlier that Israel was "not eager for war" but would make no concessions to Hamas.
U.N. Middle East envoy Nickolay Mladenov said the United Nations had engaged with Egypt in an "unprecedented effort" to avoid serious conflict, but "the situation can rapidly deteriorate with devastating consequences for all people". (Reporting by Nidal al-Mughrabi, Maayan Lubell and Ori Lewis; Writing by Jeffrey Heller and Maayan Lubell; Editing by Mark Trevelyan and Peter Graff)