Senior administration officials expressed doubt today that Libyan leader Muammar Qaddafi directly ordered the attack on TWA Flight 840, but said they could not rule out the possibility that an "unknown" group claiming responsibility for the explosion has remote links to Libya.

After the attack, which killed four Americans and injured several other passengers, a Palestinian group known as the Arab Revolutionary Cells claimed responsibility in a call to the Associated Press office in Beirut.

The U.S. officials said any connection between the group and Qaddafi appeared "obscure," as one described it. However, the official cautioned, "We can't rule it out."

Other officials said it is "very unlikely" that the attack was ordered by Qaddafi, who last week vowed revenge after clashing with U.S. forces in the Gulf of Sidra.

One senior official said there was little in preliminary reports to link Libya to the midair explosion, which occurred over southern Greece, adding that it was more characteristic of attacks carried out by small "free-lance" terrorist groups that may be sympathetic to Qaddafi but are not sponsored by him.

In an interview with United Press International, Qaddafi distanced himself from the attack, saying: "This is an act of terrorism against a civilian target, and I am totally against this."

Another U.S. official said the attack did not fit the kind of response that U.S. officials have expected from the Libyan leader in the wake of last week's military confrontation. This official said Qaddafi has targeted specific countries, cities and individuals for attack, but reports received by the United States of these threats did not include a bomb on an airliner.

"It was not the sort of thing they do," said one official familiar with U.S. intelligence on terrorism.

President Reagan was awakened and informed of the attack at 6:35 this morning (9:35 EST) in a call from deputy national security adviser Donald Fortier, presidential spokesman Larry Speakes said. Reagan is vacationing at his ranch near here.

The president ordered U.S. officials to work with Greek and Italian authorities investigating the blast, Speakes said. In Washington, officials said the Justice Department, the Federal Bureau of Investigation and the Federal Aviation Administration would assist in the probe.

Reacting cautiously, Speakes said the United States could not yet come to the conclusion that the blast was a terrorist attack. "Who or how or why it was placed there, we do not know," he said.

State Department spokesman Bernard Kalb said there has been no change in the travel alert issued last week after the naval exercises in the Gulf of Sidra.

Vice President Bush planned to depart as scheduled Thursday on a trip to the Middle East, a spokesman said.

Today's attack came as U.S. officials have been saying they expected terrorist reprisals sponsored by Qaddafi following last week's military clash, in which at least two Libyan missile boats were sunk and a missile installation was bombed.

A senior administration official said today that the United States has monitored Qaddafi's exhortations to his followers to attack American targets, and that these warnings have been specific as to countries and cities where the attacks should occur.

"Qaddafi is very far out on a limb in terms of public threats," this official said. "The evidence needed" to justify retaliation "may already be established by his public posture."

While there has been "no fundamental shift" in the U.S. criteria for retaliation, the official said that the increasing public awareness of Qaddafi's "terrorist challenge" would make it easier for the United States to retaliate if deemed necessary.

In the past, the administration has balked at direct military retaliation for terrorist actions because the perpetrators could not be identified or because innocent civilians could be harmed.

In other reaction today, Rep. Dante B. Fascell (D-Fla.), chairman of the Foreign Affairs Committee, said the attack "underscores the need for prompt and effective action to combat the spread of international terrorism."

Fascell also said that hearings this month will focus on how effectively the Foreign Airport Security Act is being implemented. The law, passed last year after another TWA jet was hijacked on a flight from Athens, requires government review of security at foreign airports and provides penalties in cases where security is found wanting.

Meanwhile, Pentagon officials said the 6th Fleet got underway from anchorage off Sicily, but that the movement had nothing to do with the plane explosion.