A Costa Rican demand that the Navy certify that the crew of the USS Luce was free of AIDS forced cancellation of a visit there by the destroyer last week, Defense Department sources said yesterday.

"There is a fear and paranoia growing about this disease that could threaten our relationships with friendly countries around the world," said one official, who like others spoke on condition of anonymity. "If we don't nip this in the bud, this could prove a very dangerous precedent." the official added.

In San Jose, Costa Rica, U.S. Embassy spokesman Mark Krischik said the incident had nothing to with a Costa Rican government decree in July that requires visiting sailors to prove that they had passed a screening test for acquired immune deficiency syndrome before being permitted ashore.

Krischik said a good-will visit by the ship was planned tentatively this week but that the United States realized that the proper fuel for the ship was unavailable at the Caribbean port of Limon and the stop was postponed.

But Pentagon sources dismissed that contention, with one official describing it as "an interesting cover story."

Costa Rica is not the first country to challenge a Navy visit because of fear of AIDS, the sources said. They said similar moves by the Philippines and other, unidentified nations have been resolved.

According to the sources, Costa Rica demanded that the Navy provide a roster of Luce crew members and "certification" that every sailor was free of AIDS.