MANAGUA, NICARAGUA, DEC. 12 -- The Sandinista government is engaged in a massive, long-term military buildup aimed at putting up to 600,000 Nicaraguans under arms by 1995 and equipping the Sandinista armed forces with advanced Soviet-made MiG fighter planes, missiles and artillery, Defense Minister Humberto Ortega confirmed today.

In a move apparently intended to preempt revelations in Washington by a high-level Sandinista military defector, Ortega outlined plans to continue a 15-year military buildup that he said started in 1980.

"This is a right that we are not going to renounce, whether Mr. Reagan likes it or not," Ortega said in a combative 90-minute speech to about 600 union delegates. He said the buildup was necessary to resist an eventual U.S. invasion and "let the gringos know that this is not Grenada."

Ortega said Nicaragua has hundreds if not thousands of officers being trained in East Bloc countries to learn how to handle the expected equipment.

The speech appeared to confirm disclosures by a close aide to Ortega, Maj. Roger Miranda, who defected to the United States Oct. 25 and gave an interview to American reporters Thursday.

After the Miranda interview, the U.S. government made available some documents that it said Miranda brought with him, including what were described as secret military cooperation protocols with the Soviet Union. The protocols project increases in manpower and Soviet-supplied equipment that, if implemented, would put about one-fifth of Nicaragua's current population under arms in the next seven years.

The interview with Miranda, news of which had been embargoed until Monday, became known to the Sandinistas after The Washington Post requested interviews with Ortega and Interior Minister Tomas Borge to obtain their responses to allegations against them. The Defense Ministry asked for written questions, which it then refused to answer.

Defense Ministry spokeswoman Maj. Rosa Pasos, speaking on behalf of Ortega, said yesterday that the government believes Miranda is suffering from "emotional maladjustment" and that "we don't need to give any explanation about all the crazy things he could have stated."

Today, however, the Sandinista party newspaper Barricada reported that Miranda had been presented to American journalists with the intention of starting a "campaign of calumnies" to influence a new vote on aid for the Nicaraguan rebels, known as contras.

Then, journalists were summoned suddenly to hear a previously unscheduled speech by Defense Minister Ortega, in which he touched upon the major points of Miranda's disclosures without mentioning the defector or any military cooperation protocols. Most of the speech, which was broadcast by radio, was devoted to explaining previously undisclosed plans for the Sandinista military buildup.

Ortega referred in general terms to military agreements with other countries. He did not deny the existence of the military cooperation protocols that Miranda is said to have delivered.

He said the United States was launching a campaign "to confuse international public opinion by painting it as something terrible that Nicaragua, a sovereign independent country, has relations with socialist countries in the field of defense." He added that Nicaragua would never cut such relations because of U.S. pressure.

"They'll say that Humberto Ortega signed defense agreements with Cuba, with our Soviet brothers, with our Czech brothers," Ortega said. "We don't consider it an offense to have relations with the Soviet Union, with Cuba or with any country in the world. This is a right of Nicaragua, and we are going to continue doing it."

Ortega also reacted sharply to an allegation by Miranda that the Sandinistas have trained Marxist-led Salvadoran rebels to use Soviet shoulder-fired missiles but have not yet given them any of these weapons. His comments stopped short of the denials previously issued concerning aid to Salvadoran or other rebels.

"What right does Reagan have to say that the Sandinistas are training Salvadoran guerrillas to use {antiaircraft missiles} when they {the United States} have given them to the mercenaries?" Ortega asked, referring to the contras.

The contras have used U.S. Red-eye missiles to shoot down a number of Sandinista helicopters this year.

Miranda told reporters from four news organizations that the plans detailed in the documents he brought with him project that the Nicaraguan armed forces, including militias and reserves, will grow from 250,000 members at present to 370,000 by 1990 and to 500,000 by 1995. The plans call for the regular Army to shrink from 80,000 to 70,000 by 1990 and remain at that level, he said.

Ortega, speaking extemporaneously, gave even higher figures for projected Sandinista armed strength.

"In a little while, we will be at 300,000, and we are going to make the effort to have 600,000 men organized in the echelons of the general defense of the country," Ortega said, adding, "We do not renounce having more modern armaments adequate for our defensive system." He said this included fighter planes, antiaircraft missiles, tanks, artillery and armored vehicles.

Ortega's assertions came as reports circulated in Washington that Soviet leader Mikhail Gorbachev, in the summit with President Reagan this week, had offered to suspend Soviet military aid to Managua if U.S. aid to rebel forces was not resumed.

The buildup described by the alleged protocols would go beyond what was needed to combat the contras:

"We estimate that, by 1990, the mercenary forces will be reduced to their lowest strength, after sustaining a total defeat during the period 1988-90," says a document entitled, "Preliminary Guidelines for 1991-95." The goal after that, it says, is to consolidate the Sandinista Popular Army "to avert the possibility of a direct invasion by American troops and assure their defeat, should the invasion occur."

Nicaragua's Central American neighbors are considered likely to view this buildup with alarm, however, western observers here said. In particular, they said, the Sandinista plans are likely to make the armed forces of countries such as Honduras, El Salvador and Guatemala more wary about a Central American peace plan signed by the region's five presidents in August.

One western observer said he viewed the military manpower buildup more as a means to assure Sandinista control of Nicaragua's 3 million population than as a response to a feared U.S. invasion.

If carried out, the planned buildup would be unprecedented in Latin America, western observers said. By comparison, according to U.S. estimates, Cuba has a total of about 1.6 million persons in its armed forces, reserves and militias -- amounting to about 17 percent of the population.

According to two of the alleged cooperation protocols that were said to have been taken out of Nicaragua by Miranda, guidelines for the 1988-90 period call for establishment of six new light-infantry brigades in the Pacific coastal region. This would strengthen 21 existing light-infantry brigades.

Up to 100 new militia battalions, of about 800 members each, would be created. An alleged protocol further calls for establishment of an antiaircraft rocket regiment "of the C-125 type" for the air defense of Managua, as well as for the immediate replacement of all lost helicopters and planes.

The type of air-defense rocket sought by the Sandinistas is believed to be the Soviet SA2 or SA3, fixed-site missiles that would replace mobile antiaircraft missiles recently moved into the field to try to shoot down U.S.-financed supply flights for the contras, a western observer said.

According to another of the alleged protocols, the Sandinistas plan to obtain from the Soviets a squadron of MiG21B fighters, as well as self-propelled antiaircraft rockets, additional Mi25 helicopter gunships and 122-mm self-propelled howitzers.

"We have not renounced that, at an appropriate time, our Air Force could obtain interceptor airplanes of any kind," Ortega said in his speech.

The MiGs are to be delivered in the 1991-95 period, the alleged cooperation agreement indicates. Miranda said in Washington that the Soviets had promised the MiGs under a protocol covering an earlier period but had not delivered them.