The assassination last week of a key American oil official was the work of a small, hardcore terrorist group with ties to Palestinian guerrillas, radical Arab regimes, and more remotely, the Soviet KGB, according to informed sources.

More than any other single event, the murder of Paul Grimm and the slaying the same day of an Iranian colleague, Malek Boroujerdi, have dramatically accelerated the economic collapse of Iran, which is threatening to topple the shah.

Just before the two men were killed, striking oil workers were returning to their jobs in the face of though military measures and oil production was rising. Immediately after the assassinations, oil output plunged and Iran now is fast running out of feul.

"The killers were definitely professionals," a Western source in close contact with Iran's security and intelligence agencies said. "The killers apparently thought drastic measures were necessary to reverse a trend in the government's favor, and that's exactly what happened."

The sources now blame the assassinations on the Mujaheddin Khalq (Peoples Strugglers), a fanatical rightwing terrorist group which has been responsible for the slaying of six other Americans in the last five years.

A Western intelligence source said the methods used in the Grimm assassination were basically the same as in the 1973 and 1975 slayings in Tehran of three U.S. Air Force colonels serving as military advisers, and the 1976 murder of three Rockwell International technicians in Tehran.

The mujaheddin guerrillas' physical training, weapons instruction and discipline are largely the product of Fatah camps in Lehanon, where Palestinian guerrilla recuits undergo rigorous combat drills under fire with live ammunition, the sources said.

There has also been evidence of funding from the radical Libyan regime of Col. Muammar Qaddafi and the ruling Iraqi Baath party, Western intelligence sources said.

The tie-in with the Soviet intelligence agency KGB largely relates to weapons supply, techniques, electronic training, some funding and general support, according to the sources.

"There's no string-pulling, but it's a very viable connection," one source said. He said the Russians were basically "just covering bets" by backing such guerrilla groups from a distance.

In contrast to the Mujaheddin guerillas, the other known Iranian terrorist group, the Cherik-e-Fedayin-e-Khalq (People's Sacrifice Guerrillas), has usually directed its attacks against Iranian police and military targets. Their style has been to spray police stations with automatic weapons fire and leave.

While the Cherik are avowedly Marxist and have ties with the radical Popular Front for the Liberation of Palestine, the Mujaheddin have a blurry ideology which stems from Shite Moslem religious fanaticism.

"The Mujaheddin is the fanatical right-wing fringe of the conservative Iranian religious group," the source said.

"This was an attack against oil production," a Western intelligence source said.

Grimm, the American general manager for operations, and Boroujerdi, who was the Ahwaz area production supervior, were "key cogs on the production side" of the Oil Service Company of Iran, which accounts for the bulk of the country's crude oil output.

Just before their deaths, production had beedn 3.5 million barrels a day and rising back toward the 6.5 million barrel norm as striking oil workers returned to their jobs.

The next day, however, output dropped to 2.3 million barrels, Now it is less than 300,000 barrels and refineries are largely closed.

A campaign by hard-line strikers to intimidate their fellow workers had been intensifying at the time of the killings, but it had not been taken very seriously.

"Afterward, the threat was seen as real and relevant," the source said.

Threatening notes to staff and workers such as "you resign or you die" then took on a new meaning.

Besides the need to act quickly, the attack on Grimm was made riskier by the large presence of martial law troops in Ahwaz. Because of past threats, Grimm's house had a 24-hour guard, and the OSCO office was heavily portected. Although he had no escort on his way to work, military patrols circulated often in the area, especially during the morning and evening rush hours.

In Grimm's assasination, three men with guaze or fabric wrapped around their faces emerged from behind a wall at a busy corner, closed in on his car and fired handguns at close range. Contrary to initial reports that submachineguns were used, the gunmen were armed with small weapons, probably revolvers, which they fired with both hands in the classic police style.

There were several witnesses at the foggy corner, but they did not have time to react, or even get a good look, because the gunmen acted quickly and smoothly, then fled.

"They were definitely professionals," one informant said. "It was a dicey thing, but they pulled it off."

The Iranian terrorist group has never been penetrated by the shahs secret police, SAVAK. It has deliberately kept membership small and used a "cell" system to avoid exposure and minimize the risk of betrayal by any captured members.

Although the Mujaheddin has a large number of sympathizers it can call up on, it probably counts no more than about 400 members, the sources say. After the Rockwell asassination, the group tried to expand into the thousands and nearly lost everything. The effort resulted in the arrests of inexperienced newcomers, who talked under SAVAK interrogation and gave away safe houses, leaders and arms caches.

The hard-core members usually take cyanide if captured, knowing that "once the government get its hands on them, their future is not bright," a source said. Terrorists who are arrested normally are interrogated under torture, then executed.

For this reason, Iranian guerillas have made assassinations and quick getaways their speciality, rather than risk taking hostages and negotiating with authorities.

So far the Mujaheddin have never been caught during an operation although they have failed to acheive their goals a couple of times against Americans.

The first was an attempt on the life of U.S. Ambassador Douglas Mac Arthur in 1970, and the second the planting of a bomb in the car of a U.S. general in 1972, both in Tehran. In the latter incident a couple of by-standers were killed but the general and an aide escaped with injuries. After that the group developed its hit-and-run style in which, despite the risks, the terroirists take time to aim and fire single rounds at their victims, the sources said.

As far a is known, aside from the 1972 car bombing, the Mujaheddin have never hit a target by mistake. Careful surveillance has been carried out in advance to determine just where and when to attack.

"They're murderers but they're selective murderers," the source said. CAPTION: Picture 1, Heavily armed troops guarded most Tehran streets as skirmishes between goups of anti-shah militants and soldiers continued throughout Iran. AP