SANTIAGO, Chile (AP) _ Army units early today ended a protest in which they refused to leave their barracks to express anger over what they call unfair media coverage of a financial scandal involving high-ranking officers.

The six-hour action Wednesday was the first instance of unrest in the armed forces since military rule ended nine months ago, but the newly restored civilian government said democracy was not in danger.

The Chilean media has widely reported on the scandal for weeks, alleging that a savings and loan operation run by people in the military resulted in losses for individual depositors that ranged as high as $500,000.

The news reports have quoted lawyers, victims and unidentified sources and the elected government of President Patricio Aylwin has indicted several retired officers in the case.

The government, apparently out of sensitivity to the country's powerful military, has disclosed few details of the case.

Many in the military charge that news reports about the scandal amount to an anti-army smear campaign.

Gen. Augusto Pinochet, who stepped down in March after 16 1/2 years in power but still heads the military, on Wednesday angrily called coverage of the savings and loan organization, known as La Cutufa, ''press fabrications.''

After the barracks protest had ended, Defense Minister Patricio Rojas attempted to portray it as some sort of exercise.

Emerging from a meeting at Aylwin's private residence, he called the protest ''a mobilization to test some coordination plans.''

Earlier, Deputy Foreign Minister Belisario Velaso had confirmed the unrest at army garrisons, but added, ''The situation is calm throughout the country.''

Rojas denied press reports that the government had demanded the resignation of Pinochet, the army commander and former military president. He said the army would later issue a communique explaining the situation.

Rojas said the government ''fully respects'' the constitutional clause that allowed Pinochet to remain army commander after handing over the presidency.

Activity was intense at army headquarters Wednesday night during the protest. Reporters saw scores of men entering the building, many in plainclothes. The men, believed to be army personnel, carried overnight bags.

No reports emerged of unrest om other branches of the armed services. The army has 60,000 troops, the air force about 18,000 and the navy 29,000.

The military in Latin America has often confined itself to barracks as a means of expressing protest, but such action is unusual in this country of 13 million people.

A special judge investigating La Cutufa, Marcos Libedinsky, has indicted eight retired army officers for illegal financial operations. Among them was retired Brig. Gen. Jaime Lucares, a former chief aide to Pinochet.

Pinochet himself ordered an internal army probe of La Cutufa, which, according to press reports that were not denied, resulted in punitive action against at least 150 officers and non-commissioned officers.

Many were discharged, the reports said.

Libedinsky said the indicted officers are charged with breaking the national banking law - in specific taking money for deposit, then paying interest, which Chilean law forbids of private citizens.

It is not clear where the name La Cutufa comes from. Some press reports said it was the name of a dog owned by one of those involved.

The last time Chile's military attempted something similar was in October 1969, when officers barricaded themselves at a Santiago regiment demanding higher pay for the military.

Pinochet seized power in a bloody 1973 coup, overthrowing elected Marxist President Salvador Allende, who died in the takeover.