King Juan Carlos appeared today to have defused major military protest over the legalization of the Spanish Community Party.

Visitors reported that the 39-year-old monarch was "in house," "cool" and prepared to let right-wing dissident officers quit the Cabinet if they wish.

It is no secret that the king backed Premier Adolfo Suares' controversial weekend decision on the party - considered Spain's "mortal enemy" by the fiercely anti-Communist military service since the 1936-39 civil war.

Spanish military sources tonight confirmed that only the navy minister, Adm. Gabriel Pita de Velga, 68, resigned because the premier had ended the 38-year ban on the party.

Other military ministers reportedly withdrew their protest resignations at the request of the monarch, who succeed Franco as commander-in-chief. But the head of the merchant navy, an admiral, quit in sympathy with the navy minister.

A Spanish news agency reported this afternoon that the army's Superior Council, which groups the top commanders, had delivered a position paper to the king and the premier stating that while it rebuked the government for the decision, the council accepted it "out of patriotic duty."

Western analysts said that the council's statement, which has not been made public, was intended to restrain anti-Communist officers in the lower ranks. The council met last night. Earlier, commanders of key operation units around Madrid, including paratroopers, met with the military chief of the Madrid military region.

Military opposition to government efforts to turn Spain into a democracy has been one of the king's main worries. He has shifted commanders since he succeeded Franco 18 months ago and decreed that the military must stay out of politics. [Apparently to avoid aggravating the situation, the now legal Communist Party announced that it was canceling a big rally planned for Sunday along with other public events, Associated Press reported.]