His declaration came as Hamas's armed wing, the Ezzedine Al-Qassam Brigades, handed over the remains of two further hostages on Saturday night under a US-brokered ceasefire agreement.
Netanyahu's office said late Saturday that a Red Cross team had received the remains of two hostages from Hamas and handed them to Israeli forces in Gaza, from where they would be taken to Israel to be identified.
The issue of the dead hostages still in Gaza has become a sticking point in the implementation of the first phase of the ceasefire. Israel has linked the reopening of the key Rafah crossing to the territory to the recovery of the hostages' remains.
Netanyahu cautioned that completing the ceasefire's second phase was essential to ending the war and involved the disarming of Hamas and the demilitarisation of the Gaza Strip.
"When that is successfully completed hopefully in an easy way, but if not, in a hard way then the war will end," he added in an appearance on right-wing Israeli Channel 14.
Hamas has so far resisted the idea and since the pause in fighting has moved to reassert its control over Gaza.