SAN SALVADOR, JULY 26 -- Negotiators for El Salvador's government and leftist guerrillas agreed early today to ask the United Nations to monitor human rights abuses in this country, torn by a decade-long civil war.

The accord, signed in San Jose, Costa Rica, after six days of talks, calls for the establishment of a U.N. rights commission, but it would begin its work only after a cease-fire, on which there is no agreement yet.

The last-minute accord, reached after an all-night session, was the first concrete agreement since talks began two months ago and indicates that both sides seek to avert a breakdown of the negotiations.

Guerrilla commander Schafik Handal, leader of the rebel negotiating team, said the document "is an accord of great value." The chief of the government delegation, Justice Minister Oscar Santamaria, called it "a very meaningful advance."

Nevertheless, the agreement failed to dispel a mood of pessimism here surrounding prospects for peace soon. The negotiators set aside until the next meeting, in August, the far thornier issues of a cease-fire and rebel demands to restructure the armed forces and purge the officer corps.

"Never before today have I seen such a reactionary attitude on the part of the government delegation," said Dagoberto Gutierrez, a member of the rebel negotiating team. "We labored word by word."

Earlier in the year, negotiators set a deadline of mid-September for a cease-fire, but rebel sources now say there is no way the deadline can be met at the present rate of progress. The lack of agreement on the key issues at the talks also raises the prospect of a new offensive by the rebels of the Farabundo Marti National Liberation Front (FMLN).

The rebels, who are skeptical that the civilian government of President Alfredo Cristiani has control over the military, want changes in the officer corps to be underway before the fighting stops. The government wants a cease-fire to come first.

The human rights agreement also skirts the issue of punishing past abuses. The rebels want four of the worst cases, including the murder of Archbishop Oscar Romero in 1980 and the killing last November of six Jesuit Priests and two Salvadoran women, to be prosecuted and those found guilty to be excluded from a general amnesty. The government wants to exclude from amnesty rebel assassinations of government officials.

"The agreement would be hard to implement," a Western diplomat said. "There are already so many different vehicles for human rights denunciations inside the country, what would it do?"

The agreement in Costa Rica contrasts with the hard-line rhetoric heard here. In a speech to the National Assembly on Wednesday, Defense Minister Humberto Larios said the military was considering legal measures to combat a "campaign of disinformation" by the rebels and "pseudo-organizations who claim to support human rights."

The rebels have been warning of the possibility of another offensive if they do not get more substantial concessions. Last November, the guerrillas occupied almost a third of the capital amid the heaviest fighting of the war. Guerrilla commanders say preparations for further attacks are in place.

But an offensive also would be costly for the rebels. The U.S. Congress is expected to vote in September on proposals to cut U.S. military aid to the government, currently running at $85 million, by up to 50 percent. The money would be restored in the event of a rebel offensive.