* Egyptian PM's brought truce feelers
* Temporary ceasefire broken immediately
* Signs of preparations for possible invasion
* Tel Aviv shaken by new rocket scare
By Nidal al-Mughrabi
GAZA, Nov 16 (Reuters) - Palestinian militants nearly hit Jerusalem with a rocket for the first time in decades on Friday and fired at Tel Aviv for a second day, in a stinging challenge to Israel's Gaza offensive after an Egyptian bid to broker a truce.
The attacks came just hours after Egypt's prime minister, denouncing what he described as Israeli aggression, visited the Gaza Strip and said Cairo was prepared to mediate.
Israel began bombing Gaza on Wednesday with an attack that killed the Hamas military chief. It says its campaign is in response to Hamas missiles fired on its territory. Hamas stepped up rocket attacks in response.
Israeli police said a rocket fired from Gaza landed in the Jerusalem area, outside the city, on Friday.
It was the first Palestinian rocket since 1970 to reach the vicinity of the holy city, which Israel claims as its capital, and was likely to spur an escalation in its three-day old air war against militants in Hamas-run Gaza.
Rockets nearly hit Tel Aviv on Thursday for the first time since Saddam Hussein's Iraq fired them during the 1991 Gulf War. An air raid siren rang out on Friday when the commercial centre was targeted again. Motorists crouched next to cars, many with their hands protecting their heads, while pedestrians scurried for cover in building stairwells.
The Jerusalem and Tel Aviv strikes have so far caused no casualties or damage, but could be political poison for Prime Minister Benjamin Netanyahu, favoured to win re-election in January on the strength of his ability to guarantee security.
"The Israel Defence Forces will continue to hit Hamas hard and are prepared to broaden the action inside Gaza," Netanyahu, signalling a possible ground campaign, said hours earlier.
A Hamas source said the Israeli air force launched an attack on the house of Hamas's commander for southern Gaza which resulted in the death of two civilians, one a child.
Officials in Gaza said 22 Palestinians had been killed in the enclave since Israel began the air offensive with the declared aim of stemming surges of rocket strikes that have disrupted life in southern Israeli towns.
The Palestinian dead include eight militants and 14 civilians, among them seven children and a pregnant woman. Three Israelis were killed by a rocket on Thursday.
A solidarity visit to Gaza by Egyptian Prime Minister Hisham Kandil, whose Islamist government is allied with Hamas but also party to a 1979 peace treaty with Israel, had appeared to open a tiny window to emergency peace diplomacy.
Kandil said: "Egypt will spare no effort ... to stop the aggression and to achieve a truce."
But a three-hour truce that Israel declared for the duration of Kandil's visit never took hold. Israel said more than 35 rockets launched from the Gaza Strip hit its territory and 86 were intercepted by the Iron Dome anti-missile system.
Israel denied Palestinian assertions that its aircraft struck while Kandil was in the enclave.
TEL AVIV ROCKET
Israel Radio's military affairs correspondent said the army's Homefront Command had told municipal officials to make civil defence preparations for the possibility that fighting could drag on for seven weeks. An Israeli military spokeswoman declined to comment on the report.
The Gaza conflagration has stoked the flames of a Middle East already ablaze with two years of Arab revolution and a civil war in Syria that threatens to leap across borders.
It is the biggest test yet for Egypt's new President Mohamed Mursi, a veteran Islamist politician from the Muslim Brotherhood who was elected this year after last year's protests ousted military autocrat Hosni Mubarak.
Egypt's Muslim Brotherhood are spiritual mentors of Hamas, yet Mursi has also pledged to respect Cairo's 1979 peace treaty with Israel, seen in the West as the cornerstone of regional security. Egypt and Israel both receive billions of dollars in U.S. military aid to underwrite their treaty.
Mursi has vocally denounced the Israeli military action while promoting Egypt as a mediator, a mission that his prime minister's visit was intended to further.
A Palestinian official close to Egypt's mediators told Reuters Kandil's visit "was the beginning of a process to explore the possibility of reaching a truce. It is early to speak of any details or of how things will evolve".
Meanwhile, Israel has begun drafting 16,000 reserve troops, a possible precursor to invasion. Tanks and self-propelled guns were seen near the border area of Friday.
Hamas fighters are no much for the Israeli military. The last Gaza war, involving a three-week long Israeli air blitz and ground invasion over the New Year period of 2008-2009, killed more than 1,400 Palestinians, mostly civilians. Thirteen Israelis also died.
Tunisia's foreign minister was due to visit Gaza on Saturday "to provide all political support for Gaza" the spokesman for the Tunisian president, Moncef Marzouki, said in a statement.
The United States asked countries that have contact with Hamas to urge the Islamist movement to stop its rocket attacks.
Hamas refuses to recognise Israel's right to exist. By contrast, Palestinian President Mahmoud Abbas, who rules in the nearby West Bank, does recognise Israel, but peace talks between the two sides have been frozen since 2010.
Abbas's supporters say they will push ahead with a plan to have Palestine declared an "observer state" rather than a mere "entity" at the United Nations later this month.