Students at the University of Chile Law School boycotted classes for almost two hours yesterday, sang the Chilean national anthem and shouted "liberty and justice" in the first anti-government student demonstration here since this country's 1973 coup.

The peaceful demonstration was another in a series of antigovernment protests that have taken place in Santiago since May 1, when a Labor Day rally was dispersed by police.

These demonstrations seem to indicate a lessening fear of demonstrating views on the part of those Chileans who believe their country should begin the transition back to democracy after five years of authoritarian military rule.

Although police were visibly present outside the Law School building on the banks of the Maipu River yesterday, they did not enter the building and made no attempt to stop the students during their protest.

The demonstration was called, in part, to protest a refusal by the Law School rector. Huge Rosende, to allow a more formal assembly sought by the students to show support for efforts to overthrow the military government in Nicaragua headed by Gen. Anastasio Somoza.

Rosende apparently feared that the assembly would have turned into a discussion of Chile's own military government, headed by President Augusto Pinochet. Over the weekend Rosende asked for troops to be stationed near the Law School in case the students decided to go ahead with the assembly without permission.

Instead, the students boycotted classes between 10:00 and about 11:45 a.m., gathered in the Law School's central plaza and later on the building's steps, to clap, sing the national anthem and finally chant the words "liberty and justice."

A handful of progovernment students, clearly outnumbered by the more than 350 demonstrators, dumped confetti on the protesting students and, at one point, began yelling "long live Pinochet."

This counter-chant was met with hisses and boos and then with a chorus of "liberty and justice" and later with chants of "a-sem-blea," a reference to the assembly the rector had refused to permit.

The vast majority of Chile's law students were still in high school during the last, turbulent years of Salvador Allende's Marxist government, which was overthrown by the military five years ago next week. The students appeared nervous and unsure of themselves yesterday as the demonstration begain. By the end, however, their voices were loud and clear as their protest gathered momentum.

Some expressed hope that other schools within the university would hold protests in the near future now that the law students had taken the initiative.

The military government, which has clearly allowed increased freedoms over the last six months, has taken different attitudes toward the different protests that have occurred. The Labor Day demonstration was dispersed, but a hunger strike by relatives of persons who have disappared, presumably at the hands of Chile's secret police, was allowed to continue for more than two weeks without any attempt by the police to stop it.

Last week, however, the government declared a state of siege in Loa Province and arrested 13 persons for participating in a labor protest at Chile's largest copper mine. The mine workers had been boycotting company-run lunchrooms as a way of demanding increased wages.

Some Chileans believe the relative tolerance toward the various protests is a sign of weakness, a belief that to some extent has encouraged more groups, like the students, to publicly demonstrate opposition to the government.

Other Chileans, however, argue that Pinochet and the military are sure enough of their control that they do not feel it necessary to clamp a tight lid on such demonstrations, which would only worsen the government's international reputation.