At least three Israeli government agencies are providing public services to dozens of ultranationalist settlers who have illegally moved into abandoned houses in the northern Sinai Peninsula and vowed not to leave until the peace treaty with Egypt is abrogated by Israel.

The government says it is content to let the squatters remain until close to the April deadline for the Israeli withdrawal from the Sinai, but it said they would be removed -- forcibly, if necessary -- by the time the remaining occupied portion of the peninsula reverts to Egypt.

Senior Israeli officials acknowledged that the squatters are receiving support services from the state, but they denied that supply of these services represents any tacit backing of the settlers' political protest. They said that since the decision had already been made to postpone an evacuation until close to the withdrawal deadline, no purpose would be served by cutting off services.

The settlers, whom the government has criticized as conducting an "illegal" demonstration by squatting in Sinai settlements six months before Israel's scheduled withdrawal, are buying electricity, water and telephone services from government-owned utilities. Their refuse is being collected by government workers and some of them are farming on state-owned land.

Moreover, many of them were given permission to enter and set up households in the abandoned homes and were given keys to the dwellings by officials of a subsidiary of the Israeli Housing Ministry, according to the settlers and a senior official of the prime minister's office.

Mattiyahu Shmuelevitz, director general of the prime minister's office, acknowledged today that some squatters had received government permission to move into the northern Sinai settlement of Yamit and that they are receiving public services from government agencies.

But Shmuelevitz said the squatters had duped the government, obtaining the keys to vacated houses on the pretext that they were merely waiting for permanent accommodations in new settlements in the Negev Desert, in Israel.

Only after they had moved in, Shmuelevitz said, did the settlers announce that they would try to physically block the scheduled April 25 Israeli withdrawal from the Sinai and, with force if necessary, scuttle the Egyptian-Israeli treaty. Shmuelevitz said a Housing Ministry subsidiary in Yamit had been asked by Negev settlement officials to provide temporary homes for the settlers.

The squatters are obtaining public services, Shmuelevitz said, because the services have to be provided to the legitimate residents of Yamit who are still negotiating with the government over terms of compensation. Israel could not cut off public services to an entire community, he said.

Moti Ben-Yanai, a member of the Yamit settlers' committee, which is negotiating compensation but is not trying to block the Sinai withdrawal, said today that between 40 and 46 families have moved into abandoned houses in Yamit to protest the Sinai withdrawal. He said most are supporters of the ultranationalist Gush Emunim movement and that many came from settlements in the West Bank.

Shmuelevitz disputed the figure. He said he once counted 12 families but that "there are probably more now and there probably will be more later." He emphasized that the government regards the movement as "an illegitimate invasion of government property" and that the squatters "will be removed when the proper time comes."

Leaders of the Stop the Sinai Withdrawal movement say, however, that they have been encouraged by what they view as tacit support by government agencies.

Ella Weizman, spokesman of the movement's committee, likened the government support to that given the Gush Emunim's illegal occupation of the former Hadassah clinic in Hebron in 1979. Prime Minister Menachem Begin denounced the Hadassah squatters as "trespassers" and threatened to evict them, but the government quietly began providing public services and helped the settlers renovate the building, enabling more squatters to move in. They are still there.

One recent Sinai squatter, Avia Luz, of the Talmei Yosef settlement, said, "We didn't sneak in here in the dead of night and break into these houses. The way was prepared for us by the officials, and the keys were handed over to us legitimately."

Shmuelevitz denied that any official sanction, unwitting or not, was given to the Talmei squatters.

The agencies involved are the Housing Ministry, which gave the squatters keys to the houses and which, through its Yamit agencies, provides the squatters with basic municipal services such as refuse collection, sewage service, police protection and education; the Agriculture Ministry, which controls water supplies to the northern Sinai, and the state-owned Israel Electric Corp., which provides electricity.

Israeli officials took pains to stress that the government is not, as a matter of policy, providing services to encourage the squatters to stay.

"The government policy is not to go fight with them now, six months before the withdrawal. They will be removed when the proper time comes," Shmuelevitz said. Albert Ben-Abu, a spokesman for the Housing Ministry, said, "There definitely was not a political decision to give them the keys and let them stay to demonstrate."

Shmuelevitz said that since the government decided not to act against the squatters now, no harm is being done by their receiving basic services along with the legitimate settlers.