After five months of heated debate over the fate of their war-destroyed homes, Palestinian refugees in this camp just outside Sidon are finally going ahead and rebuilding them, thanks to the Israeli Army that pounded them into rubble in the first place.

The controversy has made some strange bedfellows, with the Israelis finally casting themselves in the role of humanitarian champions of the Palestinian cause against the Lebanese government and forcing the hand of the U.N. agency with primary responsibility for the refugees.

The irony seems all the greater since it was the Israelis who initially opposed any activity leading to the reconstruction of the refugee camps in southern Lebanon, even the putting up of tents, on the ground that they would become "hotbeds of terrorism."

Now, they are not only providing materials and encouragement to the refugees to rebuild their homes but also protection against Christian militiamen trying to harm or stop them.

The absurdity of the whole situation has become embodied in the six Israeli-made prefabricated houses now on display before the Israeli Army headquarters in downtown Sidon. They are not, however, a gift.

They are being offered for sale to the refugees, many of whom are now penniless because family heads are locked away in the Israeli prison at Ansar, at prices ranging from $3,000 for a 15-square-yard empty container to $13,750 for one with three rooms and a kitchen.

To date, there have been no takers.

The Israeli government has not given up, however.

Tuesday, it announced that it will give refugees interested in buying a prefab cash grants ranging from $250 to $750 according to the size of the family.

In addition, the American Jewish Joint Distribution Committee, which is also helping the refugees, will provide up to 20 bags of cement for those wishing instead to rebuild their homes.

In general, the roughly 10,000 refugees who have moved back into the camp have begun rebuilding new homes themselves on the leveled-out remains of their old ones.

Technically, they are doing this illegally because the central government has not given its permission, and in fact strongly opposes it, according to John F. Defrates, director of relief services of the U.N. Relief and Works Agency (UNRWA).

"The Lebanese government has made it clear they do not want destroyed shelters in the camps in the south rebuilt," he said in an interview.

UNRWA itself was unable to begin clearing the camps of rubble and installing new water and drainage systems until Oct. 5 because the government did not give its approval until late September.

At first, the agency tried to put up tents but the refugees burned them down in protest. Denis Brown, the local UNRWA representative, charged last month that this had been done with the encouragement of Israelis, who had promised the refugees something better.

Israeli spokesman Lt. Col. Aaron Gonen, while denying that the Army "encouraged" the protest, nonetheless indicated it backed a better deal for the refugees than flimsy, small tents.

"When we saw they didn't want tents, we told them we would not prevent them from building or permit anybody from stopping them from building," he said in an interview.

Caught between the Lebanese government and the Israeli Army, UNRWA has opted for a compromise that allows the refugees either to use tents or rebuild their homes.

Each family with six members or less is getting $500 in cash, 10 sacks of cement, a plot of land -- and a tent. Larger families receive twice or three times as much, depending on their size.

"We will still be offering them tents," said Defrates. "What they do with them we are not in a position to control. Our responsibility is to offer them shelter from the elements. Within limits, we are doing that."

As for the prefabs, five private Israeli companies are competing to sell them and hoping to get UNRWA subsidies. Defrates said it was out of the question.

"It would cost millions of dollars to issue people with these prefab shelters and Lebanese authorities have said specifically no," he declared.