Libyan leader Muammar Qaddafi, bolstered by signs of growing support from the Arab world in his developing confrontation with the United States, said today that he and the cause of Arab unity had "gained a lot" from American and Israeli threats to take military action against him in the aftermath of the Rome and Vienna airport attacks.

Qaddafi spoke to American reporters in the setting of a barley field outside the capital, denying allegations that he provided any training facilities for Palestinian guerrillas, including Abu Nidal, who is suspected of initiating the Dec. 27 airport assaults in which 19 persons died.

But he said that if the Palestinians "demand" training sites in his country, "this I will give them because they are freedom fighters."

In his talk, portions of which were televised in the United States, Qaddafi again disclaimed any Libyan responsibility in the assaults. He said he personally felt that they were "not legal," although for the attackers "they may be so."

Asked about his threats to carry attacks to the United States, Qaddafi insisted that he is ready to fight America "thoroughly and violently" if Libya or Palestinians living in Libya are attacked, and he said that SA5 antiaircraft missiles delivered by the Soviet Union during the past two months "are ready, and we can use them."

But he called the 1,500 Americans living and working here "our guests" and said, "We will never harm them."

Qaddafi refused to condemn the airport attacks, as his Foreign Minister Ali Treiki did in a letter to the U.N. Secretary General two days ago and in a statement yesterday. Treiki called them "blood outrages."

"We support the freedom fighters everywhere," Qaddafi said, but "we are not responsible for their tactics."

When it was suggested that the airport raids in fact damaged the Palestinian cause, Qaddafi said, "Yes, I know, but they are obliged to do [as they did]. They may see [the attacks] as proper."

"For me as an independent state," he said, such actions are "not legal. But for them it may be so."

He said he had seen Abu Nidal "in the last year," but not recently. "He comes to visit us. I don't know where he lives," Qaddafi told the reporters, suggesting with a laugh that "he may be in Tel Aviv or Jerusalem."

Cairo newspapers had said that the Soviet missiles recently sent here are manned by up to 2,000 Soviets and that Libyans are not allowed to operate them. Apparently alluding to this, Qaddafi said, "Of course we have been trained by our friends the Soviets, but we can use them."

In a setting that seemed designed for American television cameras, Qaddafi, clad in blue overalls and a makeshift orange turban, said: "If America thinks it can hit any place, then we can strike anywhere with suicide groups. This is what I meant when I said we would take the fight to American streets." Qaddafi was referring to remarks he made on Wednesday.

But he emphasized that he is contemplating such measures only in response to acts of aggression. If attacked, "we will hurt Israeli nationals and American nationals in their places," he said. Speaking sometimes in English and sometimes in Arabic, Qaddafi scorned the United States, "a superpower," for devoting so much attention to Libya. He said that yesterday amid reports of U.S. naval and air forces readying an attack, "we were on the brink of an unlimited war."

Qaddafi contemptuously described President Reagan in Arabic as "an Israeli dog" defending Tel Aviv's interests over Washington's.

With a statement of clear support by the 22-member Arab League yesterday to bolster his political position in the region and his self-image, Qaddafi declared that "I think we have gained a lot" from the Israeli and U.S. threats. "It made the Arabs think about unity."

Libya, often seen as a renegade in the Arab world because of Qaddafi's support for Iran in the war against Iraq and his unique political beliefs, is now "the leader of the fight against imperialism exactly as happened with Egypt in 1956," Qaddafi said. Egypt's Gamal Abdel Nasser emerged as preeminent leader of the Arab world after being attacked by Israel, France and Britain in the 1956 Suez Canal conflict.

The Libyan leader echoed the tone of the Arab League declaration yesterday, which accused Israel of "state terrorism" and sought to put the airport attacks in the context of Palestinian grievances. It said that the only way to curb the current wave of violence was to attack the root of the problem.

When reporters pressed him with questions of who was responsible for the killings in Vienna and Rome and where they came from, he responded: "Palestinians are everywhere, even in America."

"Where is Abu Nidal?" he asked rhetorically. "You must solve the Palestinian problem if you want peace and to bring an end to these actions."