Antigovernment violence escalated across Iran today with American and other foreign installations coming under attack, while the shah's efforts to form a new civilian administration ran into major problems.

Conflicting reports about whether the shah would leave the country continued today. The government news agency reported that Shahpour Bakhtiar, whom the shah has asked to form a government, had said the monarch would leave "in a convenient time" for medical treatment and relaxation.

The official news agency had issued a similar report yesterday attributed to Bakhtiar only to have it flatly denied by the palace both yesterday and today.

New incidents of mob violence and troops shooting at demonstrators occured in the capital and several provincial cities as anti-American feeling concial cities as anti-American feeling continued to mount following reports that a U.S. naval task force was sailing to the Indian Ocean in an American show of strength.

Death toll claims ranged from sparse to more than 100. It was impossible to verify casualty figures.

Spurred by the continuing violence and death threats against them, hundreds of American and other foreign oil staffers and technicians are leaving Ahwaz, the center of the oil industry, this weekend. Sources said the departures would probably make it more difficult to raise crude production in Iran's strike-crippled oil fields, a key to restoring order.

The continuing violence, exodus of foreigners and political impasse cast further doubt on the future of Shah Mohammad Reza Pahlavi, who has been battling a year-long popular up-rising against his 37-year rule.

The shah's move to try to install Bakhtiar as prime minister while retaining the throne appeared to run aground today as the military posed tough new conditions and the opposition National Front refused to participate.

A spokesman for National Front leader Karim Sanjabi said the 30-man executive council of the main political opposition grouping effectively ousted long-time member Bakhtiar after he agreed to the shah's proposal to try to form a government.

Diplomatic sources said the present military-led government proposed new conditions for the establishment of a new government with Bakhtiar as prime minister. They said Bakhtiar rejected these conditions and was on the verge of abandoning the attempt to form a government.

Today's violence covered a large part of the country including most of the major cities.

A mob attacked the American consulate in the northwestern Iran city of Tabriz, but was quickly dispersed by troops, diplomats said. The crowd knocked down a gate in front of the consular building before the army intervened, and no one was reported hurt.

British consular offices came under attack in the troubled southwestern oil town of Ahwaz, the picturesque city of Shiraz in southern Iran and Mashhad in the far northeast near the soviet border.

Opposition sources reported at least 32 people killed and 125 injured in Mashhad when the military opened fire on a large demonstration.

The sources said nine died in Tehran during army shooting to crush demonstrations in which youths burned debris and set up barricades in the streets.

In Ahwaz, the military governor-general of Khuzestan Province, the country's main oil-producing region, ordered the release of about 20 recently arrested strike leaders and the withdrawal of some troops guarding oil installations in an effort to encourage a return to work that would ease Iran's acute fuel crisis.

But the measures were not enough to thwart the departure plans of foreign oil officials.

Ahwaz residents said troops unleashed heavy gunfire to disperse demonstrators who burned cars, banks and liquor stores. Diplomats said two charter planes were flying out most of the remaining 500 foreign oil workers and their dependents - nearly 2,000 people in all-as the Oil Service Company of Iran trimmed down to a skeleton staff.

On the political front, Bakhtiar seemed to be isolated after his acceptance of the shah's request to form a government as the National Front issued a strong statement disavowing him. The statement said Bakhtiar "disregarded the organization's directives" against joining any government under the shah's "illegal regime."

It concluded, "under the present conditions, formation of a government by him is in no way compatible with the ideals and aims of the National Front, and therefore he is dismissed as a member of the Front."

According to diplomats, the military indicated it would accept a government with Bakhtiar as prime minister on three conditions; that Iranian ambassador to Washington Ardeshir Zahedi be in the Cabinet, that the Tehran martial law administrator and ground forces chief. Gen. Gholam Ali Oveisi, take over as commander-in-chief, and that the shah remain in the country until order was restored.

Bakhtiar's original proposals that the shah leave the country in favor of a regency council and that the government take full control over the armed forces "would leave the military in a highly precarious position," one diplomat said.

A spokesman for the imperial palace said the shah was "absolutely exhausted" but that he would not go on a winter vacation unless calm was restored in the country. The opposition has said it believes just the contrary, that disorders will continue until the shah leaves.

News services reported the following developments:

The U.S. aircraft carrier Constellation steamed out of Subic Bay in the Philippines today, reportedly to place itself in a position closer to the Indian Ocean and the situation in Iran.

The Constellation was to rendezvous at sea with the aircraft carrier Midway and then to stand on alert in approaches to the Indian Ocean, within short sailing time of the Persian Gulf, U.S. sources said.

Exiled Shiite Moslem Leader Ayatollah Ruhollah Khomeini said in an interview with the Sunday London Telegraph that he will order opponents of the shah to "take to their guns and fight" if the monarch stays in power much longer.

The shah's aged mother Tajol-Malouk, who left Iran in an Iranian air force jetliner that landed at McGuire Air Force Base, N.J. yesterday, arrived today at Los Angeles International Airport and was whisked off under tight security to the Beverly Hills mansion of the shah's sister. An airport official was quoted as saying those obard the plane were "the shah's mother, several government staff members and other members of the shah's immediate family."

The shah's mother, who is reported to be in her 90s, was carried off the plane in a stretcher. In Iran, a government spokesman said the purpose of the trip to the United States was to receive medical treatment. CAPTION: Picture 1, Heavily armed troops guarded most Tehran streets as skirmishes between groups of anti-shah miliants and soldiers continued throughout Iran. AP; Picture 2, Shah Mohammad Reza Pahlavi presides over a meeting of members of his parliament to discuss the crisis. AP