MEXICO CITY, OCT. 2 -- The Guatemalan government and a leftist guerrilla alliance announced a cease-fire today to begin at midnight and talks to be held in Madrid next week on ending a 26-year-old insurgency.

A communique issued by the guerrillas and confirmed by the government in Guatemala said the two sides "agree to suspend all military actions that could lead to armed confrontation between the insurgent forces and the Army of Guatemala in the national territory beginning at 2400 hours {midnight} today."

It said the truce would remain in effect for the duration of the peace talks, which are scheduled to start Oct. 7 in the Spanish capital. Reports from Guatemala said the talks are expected to last about four days.

If it goes ahead as planned, the meeting in Madrid would mark the first formal talks between the government and the guerrillas. In the past, the Guatemalan Army has strongly resisted any negotiations with the rebels, who are grouped under the Guatemalan National Revolutionary Union.

The cease-fire also is believed to mark the first time both sides have agreed to a truce in the conflict, which began in 1961.

The announcement of a cease-fire and peace talks is seen as an effort by both sides to show compliance with a Central American peace agreement signed Aug. 7 in Guatemala City by President Vinicio Cerezo and the leaders of Nicaragua, El Salvador, Honduras and Costa Rica. The accord calls for cease-fires in the region's wars, amnesties, democratic reforms, an end to outside aid for insurgents and a ban on the use of one state's territory as a base for attacks on another.

According to Frank LaRue, a representative of a Guatemalan political opposition group that supports the rebels, the guerrilla alliance will seek economic and political reforms in the Madrid talks rather than a share of government power as demanded by Salvadoran rebels. He told Washington Post reporter Terri Shaw in Washington that the rebels will demand steps toward land reform, an end to political disappearances, increased participation in political life by peasants and labor unions and the "demilitarization" of the countryside by ending civil defense patrols and curtailing military-organized villages called "poles of development."

The participants in the Madrid talks have not been announced, but it is understood that the government side will be headed by a cabinet minister and the rebel side by a guerrilla commander.

The Marxist-led Guatemalan National Revolutionary Union is made up of three guerrilla groups: the Rebel Armed Forces, the Guerrilla Army of the Poor and the Organization of Armed People. The Guatemalan Workers Party, a communist group, has left the alliance but reportedly still supports its cause.

The Madrid meeting represents a concession by the government of President Cerezo, who backed away from a stated willingness to hold talks with the rebels shortly after he took office in January 1986 and has insisted since then that the rebels must lay down their arms before any negotiations can be held.

The military reportedly objected to talks with the rebels but has softened its position since the regional peace agreement was signed.

The Guatemalan National Revolutionary Union, formed in 1982, has been seeking talks with the government for more than a year since Cerezo took office as the first civilian president of Guatemala in nearly 20 years. It has occasionally published paid advertisements in local Guatemalan newspapers to state its positions, including an open letter addressed to Central American presidents during the Aug. 6-7 summit that produced the peace agreement.

Although decimated in the early 1980s by a brutal Army counterinsurgency campaign, the guerrillas have managed to keep operating in at least eight of Guatemala's 22 provinces and have been demonstrating more cohesiveness lately. In May they started weekly broadcasts on a clandestine radio station.