Egyptian jets attacked an air base in Libya this afternoon, damaging the base and some Libyan aircraft, in retaliation for three Libyan air raids into Egyptian territory, a military communique said tonight.

The communique issued by the official Middle East News Agency just as President, Anwar Sadat was completing a speech in which he said Egypt's armed forces had taught the Libyan leader, Col. Muammar Qaddaft, "a lesson he will never forget."

Despite the tension generated by reports of several armed clashes along the border between the two North African neighbors, the overall tone of Sadat's speech was not aggressive.

He referred to the border clashes in the past tense, pledged that there would be "no incursion into Libyan territory," and said that Egyptian ground forces had been pulled back from positions they occupied on the Libyan side of the frontier.

"We will not allow side issues to divert our attention from the real issue." - the struggle with Israel over return of occupied Arab lands and the status of the Palestinians, Sadat said.

According to the communique describing today's aerial combat, Egyptian jets "firmly responded" to the three Libyan raids by attacking the Libyan base at Adem, near Tobruk in eastern Libya. It formerly was a British air base. The air strikes inflicted "severe damage on the base, its installations and some of the planes," the announcement said. It said the Egyptian planes, whose number was not given, returned safely to their bases.

[The official Libyan news agency identified the base as the Gamal Abdel Nasser Air Base, after the former Egyptian leader, and said Egyptian paratroopers had landed inside Libya, UPI reported. The paratroop attack was followed by an invasion by armored vehicles, the agency said.]

Since the border area where these reported clashes are taking place is remote from most population centers and generally off limits to civilians even in quiet times, no independent verification of the nature of the fighting was available. Intelligence sources have expressed doubt that the fighting could have been of magnitude as to result in the destruction of 40 tanks, as Egypt claimed yesterday.

The armed forces of Libya, a vast desert nation of less than three million people, are far inferior to Egypt's Military experts agree that they would be thrashed in any major battles. Nevertheless, Egypt's reputation for inflating reports of military success adds to the problems of assessing what has been happening.

The border conflict with Libya was coincidental to the occasion for Sadat's speech, the 25th anniversary of the revolution that overthrew the Egyptian monarchy.

In the televised speech to political organizations at Cairo University, Sadat said that Qaddafi, whom he called "a very strange person" was "being used as the agent of a big power, and everybody knows whom I mean."

He 'ef' no doubt that this was a reference to the Soviet Union, Qaddafi's chief arms supplier. Sadat said that the Libyan leader and the Soviets "share the same spirit, the spirit of bloodshed" in their attempt to spread Soviet influence throughout Africa.

Meanwhile, the leader of the Palestine Liberation Organization, Yasser Arafat, shuttled between Cairo and Tripoli on a mediation mission. Sadat held out little hope for any overall improvement in relations, even if the fighting on the border is halted.

The split goes back several years, and has been widened recently by Egypt's decision to side with Chad in its border dispute with Libya and by Egyptian accusations of Libyan support for a Moslem extremist group that kidnapped and murdered a former Cabinet minister here.

Tonight Sadat added new charges to his long and familiar list of grievances against Qaddafi, saying the Libyan leader had tried to poison wells that provide water for Egyptian troops in the western desert, and had insisted on taking back 25 Mirage jets lent to Egypt in the 1973 war with Israel despite Sadat's request that he be allowed to keep them until replacements arrive from Saudi Arabia.

He also accused the Libyans of directly supporting Ethlopia's effort to thwart a secessionist rebellion in the Red Sea province of Eritrea. Sadat has come to view the Ethiopian government as a "red menace," and he asked tonight, "In whose interest is it to sell Eritrea to Mengistu?" This was a reference to Lt. Col. Mengistu Hailu Mariam, the Ethiopian leader.

He said that if Qaddafi's aim is "to say he's stronger than Egypt, I sent Arafat to say no, we shall beat him." he also said he nexer, that" there may be political differences between us, but there should never be involvement of the armed forces."

Sadat rejected any suggestion that Egypt has territorial ambitions in over the oil fields of the Libyan desert, a notion that is often heard around the Arab world. "Who wants his oil?" Sadat asked. "There shall be no encroachment on Libyan soil."

He mentioned the Arab-Israeli dispute only in passing, and did not reply specifically to the negotiation proposals put forward earlier this week in Washington by Israeli Prime Minister Menahem Begin.

He said the major battle reported yesterday, in which Egypt claims to have destroyed 40 Libyan tanks, shot down two planes, and captured 12 prisoners, followed a series of clashes along the border and a Libyan attack along the border and a Libyan attack on an Egyptian police station.

"I couldn't stoy my armed forces," he said.

Egypt has had an estimated 20,000 troops along the Libyan frontier since a series of terrorist incidents, allegedly inspired by Libyan, in Egypt last year.

Most of Sadat's 80-minute talk was devoted to domestic affairs, he acknowledged once again that the country faces economic difficulties and pledged that they will be overcome.