MANAGUA, NICARAGUA -- Nicaragua's government plans to release nearly a thousand political prisoners this week under a controversial amnesty criticized by both opponents and hard-line supporters of the leftist Sandinista regime.

A bill to free at least 984 prisoners, most of them accused of "counterrevolutionary activities" or membership in the National Guard of the late dictator Anastasio Somoza, is expected to be approved this week by the National Assembly. According to Vice President Sergio Ramirez, a few more names of persons to be pardoned may be added before the final version is passed.

The amnesty bill is seen here as one of the most significant -- and difficult -- steps taken by Nicaragua to show compliance with the Central American peace plan conceived by Costa Rican President Oscar Arias and approved by the region's five leaders at an August summit meeting in Guatemala.

Critics note that measures implemented so far by Nicaragua -- such as allowing the opposition newspaper La Prensa to publish, relaxing restrictions on opposition political activity and declaring limited cease-fire zones -- can be reversed quickly. But freeing political prisoners is a more difficult move to undo, and the government apparently has been reluctant to take that step.

In a news conference in Washington last week, President Daniel Ortega made it clear that the government can easily take back what it has granted so far. He warned that if the U.S. Congress "commits the crazy act" of approving a Reagan administration proposal for $270 million in aid to the Nicaraguan rebels, or contras, "we would be forced to close the political space that is opening up."

{Ortega left Washington Saturday but, instead of returning to Nicaragua as expected, flew to Mexico City. His arrival came as a surprise to Mexican diplomats, The Associated Press reported. "We didn't know he was going to come," a Foreign Ministry spokesman said.

{Ortega told reporters at the airport Saturday that he wanted to meet with Mexican President Miguel de la Madrid, "so he knows directly the steps my country is taking to comply" with the peace plan. According to AP, the meeting will take place Monday.}

To date, Managua has released only a handful of foreign prisoners to meet requirements of the peace plan, and Sandinista officials have said repeatedly that many jailed National Guardsmen and contras will not be eligible for amnesty because they committed "heinous crimes."

Indeed, the planned prisoner release has angered some hard-line militants in the ruling Sandinista National Liberation Front, who view it as too great a concession. However, antigovernment human rights activists consider the measure insufficient and accuse the government of manipulating the list of people to be freed.

According to Lino Hernandez, head of the nongovernmental Permanent Commission on Human Rights and a strong critic of the Sandinistas, many of the prisoners being pardoned are about to complete their sentences or already have served their time. He said the number being released "is not sufficient to create an atmosphere of national reconciliation."

According to the government, the list presented to the National Assembly includes 188 National Guardsmen and 763 contras out of a total of about 4,300 prisoners held on security charges. The Permanent Commission on Human Rights argues, however, that Sandinista jails hold more than 9,000 political prisoners, including about 7,000 accused contras.

Included in the list of those to be freed, according to Ortega, are about 50 Army and Interior Ministry troops out of about 450 who were jailed for abuses or other offenses.

How the government chose those who will be released from jail remains unclear.

Vilma Nunez, the head of a Sandinista human rights commission, said she originally submitted a proposal to the government in March to free a total of 618 national guardsmen, many of whom have been held since the Sandinistas took power in 1979, and contras.

Later, she gave Ortega an additional list of 726 cases, for a total of 1,344, Nunez said. None of those on her lists were members of the Army or Interior Ministry, she said, because the military already has its own mechanism for pardoning offenders.

Nunez said that of those on her original list of 618, only 161 were named in the amnesty proposal that Ortega sent to the legislature. She said the rest were turned down "for political considerations."

Nunez added that the assembly's list includes 27 persons who already have been freed, plus at least two "common criminals."