MEXICO CITY (AP) _ Negotiators for the Salvadoran government and leftist rebels reached an agreement Thursday night on a framework for negotiations to end their nearly 10-year-old war, an observer to the talks said.

''It's clear that the two sides have reached a clear agreement that they should be attempting to reach not just a cease-fire but an end to hostilities,'' said Gregorio Rosa Chavez, the auxiliary bishop of El Salvador.

A preliminary statement by Rosa Chavez said the sides had reached an accord on how to prepare the meetings and on participation of the church in the talks. He said substantive themes would be discussed at the next meeting. The current round of talks began Wednesday with a two-day schedule, but the two sides were still negotiating late into the night Thursday on a final statement. Rosa Chavez said he ''had the impression'' the future meetings would be held on a monthly basis and that they would include international observers. He added that the talks would take place inside and outside El Salvador.

Earlier in the day, the Marxist rebels and U.S.-backed government argued about the pace of peace talks to end the war, which has taken 70,000 lives.

One rebel leader, Shafick Handal, told reporters the government's concern for procedural matters was ''very restrictive.''

Fighting continued in El Salvador, despite a unilateral truce declared by the guerrillas. Army spokesmen in San Salvador said four guerrillas were killed, two guerrillas and one soldier were wounded, a helicopter was damaged and two buses were torched.

In San Salvador, Col. Orlando Zepeda, the vice minister of defense, called the rebel proposal to reorganize and reduce the size of the armed forces a thinly disguised attempt to seize power. ''We continue to be the object of Marxist aggression,'' Zepeda said.

Government representatives had insisted that procedural issues be settled first, setting aside discussion of a rebel offer to lay down their arms and reorganize as a political party in exchange for democratic reforms.

Sources for both sides also said they were divided on whether some negotiating sessions should take place without the presence of observers or Roman Catholic Church mediators.

The guerrillas made the proposal Wednesday in their first talks with the government in two years.

El Salvador's government has not presented a peace plan, but the five-man delegation arrived with a proposal calling for two days of talks every two months.

Rebels leaders said they want a faster-paced negotiating plan.

Both sides say they want to end the war.

Salvadoran Ambassador Sigfrido Munes Cruz told reporters Thursday that the rebel proposal shows ''a new attitude, a more realistic attitude.''

Munes is not a member of the government delegation, but he said he feels optimistic.

The meeting is the first between the rebels and the elected Republican Nationalist Alliance government of President Alfredo Cristiani, who took office June 1 after elections boycotted by the insurgents.

The rebels' peace proposal calls for a cease-fire by Nov. 15 in exchanscheduled for 1991.

The guerrillas also say a truce is conditional on military reorganization, including a reduction in the number of troops, expanded land reform and the prosecution of death squad members.

Roberto d'Aubuisson, founder of Cristiani's party, has been accused of playing a key role in rightist death squads that have murdered thousands of leftists, suspected leftists and other government opponents.

Under the final stage of their proposal, the guerrillas call for constitutional and electoral reforms and U.S. agreement to replace military aid to the Salvadoran government with economic aid.

El Salvador is the largest recipient of U.S. aid in the hemisphere.

The rebel plan contains many proposals rejected before, but the wording this time is much milder and the rebels have dropped a longstanding insistence on merging their army with the goverment armed forces.

Their offer to become a political party also is new.

Negotiations in 1984 and 1987 failed.