The Israeli attorney general announced Tuesday that he had dropped a corruption investigation of Prime Minister Ariel Sharon, freeing Sharon from the threat he could be forced to resign.

"The evidence in this case does not bring us even close to the existence of reasonable possibility of a conviction," Attorney General Menachem Mazuz told reporters.

When Mazuz delivered the news to Sharon in a telephone conversation, according to Israel's Channel Two television, the prime minister said "thank you."

Soon afterward, Mazuz announced the decision and insisted it was based on the law. "In order to dismiss any doubts, I want to emphasize that I made this decision from the standpoint that there is one law for both the prime minister and for the common man in the matter of sufficient evidence to stand trial," he said.

His decision contradicts the recommendation of State Attorney Edna Arbel, Israel's chief prosecutor, who investigated the case and announced in March that the prime minister should be indicted.

"It was always a judgment call," said Yoram Shachar, a professor of law at the Interdisciplinary Center in Herzliya, adding that either decision would have been legally defensible.

Some of Sharon's cabinet ministers had said the prime minister should resign if the attorney general decided to indict him.

At issue are payments of hundreds of thousands of dollars from a developer to Sharon's son Gilad in the late 1990s. The investigation focused on whether Sharon, then foreign minister, used his position to lobby the government of Athens to help approve a Greek island resort for the developer, David Appel, who has been indicted. The resort was never built, but Gilad was paid $100,000 in salary and another $580,000 was transferred to the account of the Sharon family ranch in the Negev desert.

Yossi Sarid, a member of parliament, said he would appeal the decision to the High Court.

Israeli prosecutors are still investigating Sharon and his sons for allegedly receiving a $1.5 million loan from a South African businessman. Sharon has denied any wrongdoing.

Also Tuesday, the Israeli daily, Maariv, reported that Defense Minister Shaul Mofaz had asked the military to prepare plans within three months for building thousands of housing units in the West Bank settlements. The units would be occupied by settlers evacuated from the Gaza Strip under a withdrawal plan Sharon is pushing.

The defense ministry acknowledged that Mofaz talked with settler leaders at the Gush Etzion settlement bloc, south of Jerusalem. But Deputy Defense Minister Zeev Boim said that Mofaz is expected to approve construction of hundreds of units of settlement housing, and denied that it was intended for Gaza settlers.

Boim said arrangements for resettlement or monetary compensation for evacuees from Gaza have not yet been decided.

Ariel Sharon faced indictment on corruption charges.