Prime Minister Benjamin Netanyahu said Thursday he would not allow the illegally built homes of two Israeli soldiers killed in action to be demolished. Both houses were built on illegal outposts in the West Bank, one on private Palestinian land.

Defense Minister Ehud Barak said that unless a legal solution is found, the state will have to tear down the houses of the two soldiers, Eliraz Peretz and Roi Klein.

"I won't let those houses be destroyed," Netanyahu said at a Manufacturers Association gathering in Tel Aviv. "I think it's a moral duty we have to those two heroes and their families. It's a matter of common sense, there's a public debt and it won't happen."

The state was due to tell the High Court of Justice Thursday of its plans on the houses' demolition. But at Netanyahu's request the prosecution asked the court to postpone the state's reply by a month, giving it time to find a solution.

In 2005, Peace Now petitioned the High Court of Justice, demanding the demolition of 12 illegally built houses in the Givat Hayovel outpost. In November that year the court ordered the state to explain why the houses should not be torn down.

After three years of stalling, the state said the houses would be demolished, subject to priorities. In July 2009 the court said it intended to issue a demolition order, but put this off to enable a hearing for the residents.

Meanwhile, Peretz was killed in Gaza and the state asked to reexamine the land's status. It found that two of the outpost's houses, including Peretz's, were built on private Palestinian land. The others, including Klein's house, were on state land.

Last week the Defense Ministry and State Prosecution tried to develop the state's position for the court. Barak said a legal solution should be found to legitimize Peretz's house, but if none was found, the house should be demolished.

One suggestion last week was to tear down the house, inhabited by Peretz's widow, and rebuild it in the nearby settlement of Eli so it would be located on state-owned land.

But Eli has no master plan, so every construction change there is illegal. The settlement is located on large areas of private Palestinian land and exceeds its originally allocated area. This means many changes, including moving buildings, are required before a master plan can be drawn up and approved.

Another obstacle is a cabinet decision made during Netanyahu's first government that establishing a new settlement requires a cabinet decision. Givat Hayovel was set up without a cabinet decision. Legal experts disagree on whether it is considered an outpost near Eli and is included in the decision to build Eli, or requires a new cabinet decision to legitimize it.

Another possible way out is to give the owner of the land under Peretz's house alternative land. But the state does not know who owns the land and has no one to negotiate the transaction with.

The Ministerial Committee for Legislation is expected to discuss a bill next week forbidding the state from tearing down houses in West Bank settlements without the approval of the Knesset's Foreign Affairs and Defense Committee.

Sponsored by MK Carmel Shama-Hacohen (Likud), the bill will apply to existing demolition orders as well. The defense minister has exclusive authority to demolish settlers' illegal homes in the West Bank. The bill is intended to give this authority to the Knesset committee.