A fierce diplomatic battle pitching the United States against Nicaragua ended with a tie at the United Nations. The General Assembly Friday adopted by consensus a resolution which ''calls for an end of aggression against Nicaragua'' and condemns ''attacks launched from outside Nicaragua against that country's strategic installations.'' But the resolution also regrets ''the continued loss of life in Honduras and Salvador'' and encourages ''democratic, pluralistic systems in the region.''
The US-Nicaraguan duel at the UN was considered by many observers to foreshadow the expected clash at the Organization of American States meeting in Washington this week. US diplomats expect the Grenada invasion will be ''deeply deplored'' but not ''condemned.''
The UN text was the result of a compromise reached with Algerian mediation after a week of maneuvers. Nicaragua had wanted a much tougher draft that would mention the US by name and condemn its role in Central America.
The Contadora group (Mexico, Panama, Colombia, and Venezuela), which is trying to find a political solution to the Central American crisis, was divided: Mexico leaned toward Nicaragua and the three others leaned toward Nicaragua's neighbors.
Nicaragua's cause was strengthened at the last minute by a New York Times report describing efforts by a Central American defense alliance ''to study the legality of a joint military action against Nicaragua.'' The Central American Defense Council (Condeca), founded under US sponsorship in 1964, is being revived by the Reagan administration.
Many delegates found bizarre the fact that Contadora-member Panama is also a party to Condeca's efforts. That fact aroused more sympathy for Nicaragua than is ordinarily found among nonaligned nations.