Nearly half a million persons rallied on the campus of Madrid University today in a peace demonstration that was the largest mobilization to date in the campaign by Spain's left-wing opposition to block the government's already advanced plans to join NATO.

The Madrid rally was organized along lines of recent peace protests elsewhere in Western Europe, offering a mixture of political speech-making and rock music. The mass turnout showed the spreading strength of the peace movement in Europe and served as evidence that Spain's entry into the Atlantic Alliance, backed by the centrist government and minority conservative parties, is a divisive issue in Spain.

The protest was the largest popular rally in Spain since thousands demonstrated in favor of democracy following a failed military coup attempt in February. There has been increasing talk of renewed rightist coup plotting in recent days, and condemnation of coup attempts formed a major subtheme at the campus rally.

Socialist opposition leader Felipe Gonzalez, giving the rally's keynote address, stressed the divisions NATO has caused in Spain and compared the demonstration to peace protests elsewhere in Europe. "What will the NATO allies say when they learn half a million protested against NATO entry in Madrid, double the number that joined the peace rally in Bonn?" Gonzalez declared.

About 250,000 people demonstrated in Bonn Oct. 10 to protest the planned NATO deployment of new nuclear missiles in West Germany, in a rally that lacked the Madrid protest's explicit anti-NATO tone.

The Spanish rally was sponsored by the Socialist and Communist parties with the backing of labor unions and civic organizations. Organizers claimed a turnout of 500,000, and police gave a figure of 400,000. The civil governor of Madrid put attendance at 100,000.

Early opposition to Spanish membership in the North Atlantic Treaty Organization stemmed from Spain's traditional isolationism, which kept the nation as a nonbelligerent during the two world wars and has been bolstered by the current peace movement against nuclear weapons in Europe.

Calls for a referendum on the issue by the left-wing opposition were rejected by the government last month when the ruling Union of the Democratic Center party won strong congressional endorsement for entry. Senate ratification of the lower house's endorsement is expected later this month, and an invitation for Spain to join the alliance could be tendered by the NATO winter council meeting in December.

In his speech, Gonzalez also addressed the rumors of coup plotting by military units. He said the rally was held at a significant and crucial moment and was a warning to those who sought to reverse Spain's transition to democracy.

The rumors had reached such a crescendo that on Thursday the government issued an unprecedented statement declaring there was absolute normality in all Army barracks. Much of the coup nervousness has centered on alleged discontent in the military hierarchy over policy disputes within the ruling party.