Israeli forces have started withdrawing from Jenin refugee camp in the occupied West Bank, a defence source says.
This ends a major two-day operation during which 12 Palestinians and one Israeli soldier have been killed, reports BBC.
Gunfire and explosions could be heard across Jenin camp as the news emerged on Tuesday evening.
The Israeli military said later that it had intercepted five rockets fired towards southern Israel by Palestinian militants in the Gaza Strip.
No group immediately claimed that it was behind the launches.
As the Israeli withdrawal from Jenin got under way, Palestinian health officials reported that a Palestinian man was killed by Israeli forces. It said he was the 12th Palestinian fatality in the city since Monday.
Separately, the Israeli military said a non-commissioned officer in combat service was killed by live fire in the refugee camp on Tuesday evening.
Earlier in the day, the militant group Hamas - which governs Gaza - said a car-ramming and stabbing attack in Israel was a response to the Jenin operation.
Israeli authorities said seven people were injured on a busy shopping street in the city of Tel Aviv and that the attacker was a Palestinian man from the West Bank. He was shot dead by a civilian.
Israel's Prime Minister, Benjamin Netanyahu, said: "Whoever thinks that such an attack will deter us from continuing our fight against terrorism is mistaken."
He also confirmed that Israeli forces were "completing the mission" in Jenin, but warned that it would not be a "one-time action".
Palestinian leaders accused Israel of mounting an "invasion".
The Israeli military launched its operation in Jenin refugee camp early on Monday with a drone strike that it said targeted a joint command centre of the Jenin Brigades - a unit made up of different militant groups, including Hamas.
Drones carried out further air strikes as hundreds of troops entered the camp and engaged in intense gun battles with armed Palestinians inside the camp.
The military said the "counter-terrorism operation" was focused on seizing weapons and "breaking the safe haven mindset of the camp".
At a news conference in Geneva on Tuesday, a spokeswoman for the UN's humanitarian office said it was "alarmed at the scale of air and ground operations that are taking place in Jenin and continuing today in the West Bank, and especially [the] air strikes hitting a densely populated refugee camp".
She said the Palestinian health ministry had confirmed that three children - two 17-year-old boys and a 16-year-old boy - were among those killed, and warned that damage to infrastructure meant most of the camp now had no drinking water or electricity.
The World Health Organization said Palestinian ambulance crews had been prevented from entering parts of the camp, including to reach people who were critically injured. The health ministry has said more than 140 Palestinians have been injured, 30 of them critically.
A Palestinian Red Crescent official said about 3,000 Palestinians, including many sick and elderly, were allowed overnight to flee the drone strikes and gun battles between Israeli troops and armed Palestinians.
A man in a wheelchair who was escorted out of the camp with his family in the morning told the BBC that they had been held in a room by Israeli troops.
"We were encircled by a military barricade. Israeli soldiers came. Now we just went out. There were no people left in the camp. We were the only ones."
He added: "It's been a very difficult situation. The drone was shooting at us. Now we've just left. And we're all tired. We've had no food... No drink."
Outside a hospital in the nearby city centre, Palestinians protesters threw stones at an Israeli military vehicle, prompting it to fire tear gas in response.
Medical charity Médecins Sans Frontières complained that paramedics had been forced to proceed on foot because Israeli military bulldozers had destroyed many roads, stripping them of tarmac.
In an interview with CNN on Tuesday night, chief military spokesman Rear Admiral Daniel Hagari said that no non-combatants had been killed during the operation.
He also said he had seen ambulances driving freely inside the camp during the day, adding: "We are assisting those ambulances to evacuate the wounded."
The admiral said bulldozers had dug up about 2km (1.2 miles) of roads inside the camp along which militants had concealed explosive devices, putting civilians and troops at risk.
Jenin has become a stronghold of a new generation of Palestinian militants who have become deeply frustrated by the West Bank-based Palestinian Authority's aging leadership and the restrictions of the Israeli occupation.
The city has seen repeated Israeli military raids in the past year as local Palestinians have carried out deadly attacks on Israelis. Other Palestinian attackers have hidden there.
Palestinian Prime Minister Mohammed Shtayyeh rejected statements from foreign governments saying that Israel had the right to defend itself.
"Israel is internationally recognised as the occupying power over our land and people," he tweeted. "[It] should be condemned for its use of force to destroy the camp's infrastructure, facilities, and homes, and to kill, arrest, and displace innocent people."
"It is the Palestinian people that have the right to self-defence. There is no such right for an occupying power," he added.