The Nicaraguan government denied yesterday that it sent arms to the Colombian antigovernment guerrilla organization that took over Colombia's justice palace in November.

"We reiterate that Nicaragua has had no type of involvement in the internal affairs of Colombia, much less in the tragic events at the justice palace," said Foreign Minister Miguel d'Escoto in a letter sent to Colombia's foreign minister yesterday.

Colombian Foreign Minister Augusto Ramirez Ocampo charged earlier that several rifles found in the justice palace after it was retaken from the guerrillas were traced to Nicaragua.

The Colombian foreign minister said in a letter to his Nicaraguan counterpart last week that two Belgian rifles were traced by serial numbers to arms shipments sent to the Sandinista guerrillas in 1979 by Venezuela. Two U.S.-made rifles were traced by serial numbers to Nicaragua's former National Guard and markings on others indicated that at least two and perhaps six had been used by the Nicaraguan Army under former dictator Anastasio Somoza, Ramirez's letter said.

Referring to the Belgian rifles, d'Escoto said that only a third of the weapons shipments intended for the Sandinista Front during the revolution ended up in the Sandinistas' hands.

He said that until now the government "has not known the whereabouts of the Belgian supplies."

D'Escoto said that many members of Nicaragua's former National Guard fled to Honduras with their weapons and equipment after Somoza was ousted in 1979.

"It is well known that there is intense arms traffic in that neighboring country, and for that reason, Nicaragua does not feel it can take responsibility for guns pertaining to the old National Guard," he said.

On Nov. 6, members of the M19 Colombian guerrilla organization stormed the justice palace in Bogota. About 100 persons, 11 of them Supreme Court justices, were killed in the assault and the government's counterattack on the palace.

Although the discovery of the weapons has left relations between Nicaragua and Colombia strained, the letter from Colombia's foreign minister was the first formal protest. In late December the Colombian government called home for consultation its ambassador to Nicaragua, Avelardo Duarte, who has yet to return.