King Hassan II, spiritual and temporal ruler of Morocco, directed an extraordinary appeal to his compatriots last month on the Islamic Feast of the Slaughter. His royal message: spare the sheep.

The monarch's call, the first of its kind in memory here, flew in the face of a centuries-old Moslem tradition prescribing the slaughter of lambs to mark the celebration, Eid al-Adha. It dramatized for Morocco's deeply Islamic population the extent to which their country has been wounded by a drought described by outside experts as the most devastating on record.

Because the rains failed, Morocco lost half its major grain crop this year and overall agricultural production dropped by more than 25 percent. Now, warm sun and clear blue skies have lasted well beyond schedule again this fall, delighting tourists but threatening farmers with the second disastrous failure in a row.

As a result, the sheep herds that provide most of the country's meat often have nothing to graze on but dust. As farmers seek to unload animals they cannot nourish, slaughtering has raced ahead of normal rates, compromising production for coming years and prompting the king to launch his unusual appeal.

"One year's drought was disastrous; two years' would be catastrophic," said a foreign aid official in Rabat, the capital, 60 miles north of here.

The financial and human strain has added tension to a political situation already unsettled enough to lead thousands of Casablanca residents into bloody riots last June 20 to 22. The disturbances, put down only after Hassan's Army came into the crowded streets with armored cars and automatic weapons, took 67 lives according to the Interior Ministry; more than 600 lives, according to a French lawyer investigating for the International Civil Rights Federation; or about 250, according to several independent diplomatic estimates.

Whatever the toll, the riots left a bitter taste in the mouths of thousands of poor or unemployed families who had come from the parched countryside to live in this port city's ramshackle slums or lanes of cinderblock huts with corrugated tin roofs. The confrontations also increased the bitterness between Hassan and his main open political opposition, the Socialist Union of Popular Forces (SUPF), prompting sharp repressive measures from the king.

"What happened on June 20th could happen again, and it could flare up in a spontaneous, uncontrolled way," warned a SUPF militant during a tour of Casablanca's teeming poverty belt. "Instead of solving these problems they increased the repression. It's bound to explode."

The problems are easily visible. Only a 10-minute drive from Casablanca's beachfront resort and chic night clubs lie the crowded tenements of Boush N'touf, where street boys were seen playing soccer with a dead rat instead of a ball, or the makeshift huts of Ben M'sik, where thousands of families live without electricity or sewers in what resembles a Palestinian refugee camp in Lebanon. The area is intersected by a new four-lane freeway leading to the modern Mohammed V Airport at the edge of the city.

While beach talk these days revolves around "Coco," a local figure recently arrested on charges connected with the supply of virgin girls to rich Persian Gulf vacationers, the conversation at Ben M'sik turns to the hunt for a job. One teen-ager interviewed in a lane between the huts said he has found one -- in a trailer factory that pays 40 cents an hour.

The World Bank recently estimated that more than 40 percent of Morocco's 21 million inhabitants live on less than $250 a year. In a nation where three-fourths of the population is rural and most grain is consumed in the villages where it is grown, the figure has limited meaning. But with the drought added to problems caused by a 3.2 percent annual population growth, even villages increasingly are without adequate foodstuffs.

The government estimates that Moroccan farms this year produced only a third of the 6 million metric tons of grain needed to feed people and livestock, forcing an increase in imports and straining already scarce foreign exchange reserves. As a result, there is a growing number of youths leaving family farms to take up residence in slums such as those that ring Casablanca.

"For a while they lived on their reserves, but now they don't have any anymore," an opposition politician said.

Like his colleagues, the official requested anonymity. The fear of speaking out follows a government crackdown since the June riots, directed mainly at the SUPF and its allied labor union, both of which are blamed by authorities for the unrest. Dozens of SUPF and union members were jailed following the riots. The party's daily newspaper, Moharrir, and a weekly magazine were suspended indefinitely.

The ailing SUPF leader, Abderahim Bouabid, has been placed under house arrest with two colleagues in the remote village of Missour because of a party statement last September questioning Hassan's willingness to hold a referendum in the embattled Western Sahara. The arrest of Bouabid, a respected former minister and ambassador said to enjoy Hassan's personal favor, was interpreted as a sign of royal nervousness over the Casablanca riots.

In a touch of irony underlined by Bouabid's followers, Missour is where French authorities used to exile nationalist leaders during Morocco's struggle for independence. In another touch of irony -- this one not underlined -- the party statement questioned Hassan not because he is persisting with the war, but because, in the party's view, he is taking too many chances in trying to end it.

The idea of a leftist party attacking the monarch from the right surprises few here. Morocco's official claim to a historical right to the Western Sahara seems backed by a broad national consensus that crosses over other political lines.

Moreover, even the most militant SUPF leaders avoid calling into question the principle of Hassan's monarchical rule. Instead, they urge resumption of the political liberalization he has put into motion in recent years -- and now has halted abruptly by postponing parliamentary elections due last month and by jailing his main opponents.