A dispute between two small religious parties that briefly threatened to unravel Israel's government of national unity was resolved late last night before it triggered a full-scale crisis.

The negotiated settlement of the dispute ended a threat by the Likud bloc, one of the two principal partners, to leave the government if the demands of an allied religious party were not met.

The dispute centered on a battle over control of Israel's Interior and Religious Affairs ministries between the Sephardic Torah Guardians (Shas) party, which was supported by the Likud, and the National Religious Party.

The Shas party formally resigned from the government on Tuesday, bringing the dispute to a head and setting off frantic negotiations to prevent a more serious rupture. Under the agreement that enticed Shas back into the government, the party was given control of the Interior Ministry and the National Religious Party was left in charge of the smaller Religious Affairs Ministry.

The key element in the settlement involved an agreement that the two parties share control over the budgets of Israel's local religious councils. It called for 60 percent of these funds to be channeled through the Interior Ministry and 40 percent through the Religious Affairs Ministry.