The shah of Iran has fired the feared head of the country's powerful internal security organization, SAVAK.

Gen. Nematollah Nassiri, 71, was sacked by Shah Mohammad Reza Pahlavi after months of urban unrest and growing opposition in the country. For years one of the shah's most trusted aides, Gen. Nassiri will now become ambassador to Pakistan.

Nassiri's dismissal came after a general strike on Monday - the second in two months - that shut down the capital and three other cities. At least 50 people have died this year in clashes with police in anti-shah protests. Opponents of the sah have blamed brutality of SAVAK for much of the trouble.

The organization, set up with the help of the American CIA, was created in 1956 to remove the remnants of Iran's outlawed Tudeh Communist Party. Headed by Nassiri for the last decade. SAVAK enjoyed an unrestricted right to arrest dissidents, detain them indefinitely without trial and summarily execute them without appeal.

Protesting Iranian students in the United States often wear masks, saying that SAVAK agents photograph them.

The shah, while denying allegations of tocture and secret executions, has begun to review the agency's sweeping powers.

Last year, Western experts say, changes proposed by the shah brought about a sharp decrease in the number of known cases of torture. The changes were designed to give most defendants the right to an open trial.

The government had no official comment on Nassiri's ouster yesterday, and no successor has been named.

Despite the government's silence, opposition sources said, We know what it is, and we welcome it."

Political sources said the surprise dismissal indicated, the shah's displeasure with SAVAK, and claimed it will probably lead to stricter control on its future activities.

The shah is also expected to order a shakeup of Prime Minister Jamshid Amouzegar's Cabinet shortly, as part of a program to attemtp to remove the cause of economic ad social distress.