American officials said yesterday that Anwar Sadat may have had some very recent warning signs that an attempt on his life was being plotted and had reason to fear portions of his own military and assassination squads from Libya.

Nevertheless, a number of U.S. specialists, sifting through bits of information and claims of responsibility for the attack by an Egyptian exile group headquarted in Libya, said they had no hard evidence at the moment nor any conclusions about who killed Anwar Sadat and why.

The specialists, however, disclosed the following points:

During a crackdown in recent weeks by Sadat on many domestic foes, including Islamic fundamentalists and such fanatic Islamic revivalist groups as the Moslem Brotherhood, evidence of planning for a coup against the Egyptian president was uncovered. Among the plotters, sources said, were some military people who had a connection to the Moslem Brotherhood.

While some members of the military have been members of fundamentalist groups for many years, sources said they had not been connected before to plots against the government. The information suggested, specialists said, that the Moslem Brotherhood and other extremist Moslem groups such as Al-Takfir wal-Higra (which reportedly assassinated a government minister in 1977) had pentrated the military far more deeply than had been thought. That same information, sources say, probably gave Sadat some warning of impending danger.

Three or four times in the past two years, Egyptian security forces have arrested groups of a half-dozen people, mostly Libyans and other non-Egyptian Arabs, who, under interrogation by Sadat's intelligence officers, have reportedly admitted to being sent into Egypt by Libyan ruler Col. Muammar Qaddafi with the mission of assassinating the Egyptian ruler. American officials believe these reports from Egyptian intelligence are probably correct.

One intelligence source also said that Qaddafi, judging from some public statements and other information, appeared to be becoming increasingly "paranoid" in recent weeks about supposed Egyptian and American plots against him. Last week, Qaddafi's plane was returning from Belgrade when it apparently strayed over Italian airspace and was intercepted by an Italian jet fighter. Libyan radio later described the incident as "perhaps . . . an attempt to implement the American plan to get rid of Col. Qaddafi."

In recent weeks, explosions in Khartoum, the capital of Sudan, are also believed by U.S. government specialists to have been assassination attempts against Sudanese President Jaafar Nimeri sponsored by Qaddafi and carried out by local dissidents. There is considerable concern within both the U.S. and Egyptian governments, which have strongly backed Sudan against Libya, over the fate of Nimeri's rule. Sudan borders on Egypt and Libya.

In a speech Monday night, Qaddafi said publicly that he would "spare no effort in toppling Sadat and Nimeri," and after the news of Sadat's assassination yesterday, the Libyan radio called on the Arab people of Egypt to rejoice, march on Cairo, seize the radio station to broadcast the message of revolution before the "American opportunists" and remove Sadat's body from the hospital before he was turned into a martyr.

In Beirut, Western news agencies received telephone calls from an exiled Egyptian opposition group known variously as the Independent Organization for the Liberation of Egypt, the Front for the Liberation of Egypt and the Rejection Front for the Liberation of Arab Egypt. This organization is headquartered in an eight-story building in Tripoli, Libya, along with other so-called national liberation groups. The group has branches in Lebanon, Syria and Algeria.

The front is headed by Saadeddin Shazli, a former Egyptian general who was chief of staff of the Egyptian armed forces between 1971 and 1973. In 1973, Shazli led Egyptian forces in temporarily recapturing the Suez Canal from Israel -- the victory that was being celebrated yesterday by the parade during which Sadat was killed.

Shazli was dismissed by Sadat after Egytian forces eventually collapsed in the war with Israel. Shazli was later assigned to diplomatic posts, but openly broke with and denounced Sadat in 1978 over the Camp David accords with Israel.

Shazli moved through Europe and Algeria and wound up in Libya with some support from Qaddafi, although specialists differ in their estimates of whether the former Egyptian general has any assassination squads of his own. In an April 1980, press conference in Syria, Shazli vowed to try and overthrow Sadat by "democratic methods . . . or else by revolutionary violence."

In a statement broadcast from Paris yesterday, Shazli did not claim the assassination was the work of his group, but hailed the assassins as "patriots" who "had no choice but to counter violence with violence."

Thus, in the immediate aftermath of yesterday's stunning events, two main theories seemed to have evolved.

One is that the Moslem Brotherhood had found fanatical supporters in the military and was behind the attack. A second involves the reported claims of Shazli's group, which would link Egyptian exiles, Libyan support and probably connections within the Egyptian military through Shazli. Although Shazli has tried to put together a broadly based coalition of dissident groups opposing Sadat, in April 1980, he also specifically denied that his group included the "extremist" Moslem Brotherhood.

Some sources here said a conspiracy within the military had to be a strong possibility because the troops normally would not be allowed to have ammunition in their weapons on parade and because they were so well positioned.

American officials, however, have not discounted the possibility that Libya or another radical Arab group may have been more directly involved, or even that the attack may have been hatched by internal political opposition. The officials emphasize, however, that their information about dissident groups comes largely from Egyptian intelligence, and there is relatively little chance for independent verification.