PENAS BLANCAS, NICARAGUA, SEPT. 19 -- There was no marching band to welcome 20 Nicaraguan prisoners of war who returned to their country late last night after being freed from rebel jails.

Crossing in silence and darkness from Costa Rica to Penas Blancas, a Nicaraguan border post, they were received by a small party of stony-faced Sandinista Army officers and a blinding swarm of gnats.

The Sandinista military has refused to acknowledge publicly that the rebels, known as counterrevolutionaries or contras, were holding any captured soldiers and appeared reluctant to welcome them back.

Under the auspices of the government of Costa Rica, the Nicaraguan Resistance, the contra alliance, freed 80 prisoners yesterday in Liberia, a town in northern Costa Rica. The prisoners were flown in a contra DC6 from Aguacate air base in Honduras after being rounded up from several jails in base camps near the border with Nicaragua, former prisoners said. Only 20 men came back to their country; the rest chose to stay in Costa Rica.

It was the first time that the contras had freed a large group of captives in an international effort. Sandinista authorities have refused any direct talks with contra leaders and any direct prisoner exchange.

The contras took the initiative to comply with the terms of a peace plan signed Aug. 7 in Guatemala by the five Central American presidents.

"The contras did this to make themselves look like legitimate actors in this peace process, but it was just a show," said Oscar Tellez, a Foreign Ministry official who led the men across the border.

Nicaraguan Resistance leader Alfredo Cesar described the freed Nicaraguans in Liberia yesterday as Army regulars and militiamen captured in battle, according to reporters in Liberia. But the former prisoners who came to Nicaragua said in interviews that only a minority of them were in the Sandinista Army when they were captured.

Most were civilians picked up by contra field commanders who tried to recruit them or accused them of being Sandinista informers. Some were not even in Nicaragua when they were captured, but were in Honduras working as migrant farm workers.

Teodoro Ortiz Valdivia said he was captured by contras in northern Jinotega province because a spiteful neighbor told them that he worked for the Sandinista state security police.

None of the prisoners complained of bad treatment in the log shacks that served as jails. Although there was confusion over their identities, their accounts appeared to describe a significant improvement in contra prisoner procedures. Until early 1985, the contras did not routinely take any Sandinista prisoners.

In Liberia, former prisoners who stayed behind said they feared that they would be treated with suspicion by Sandinista authorities if they returned to their country. Some expressed open sympathy with the contra cause, rejecting what they called the communist policies of the Sandinista government.

Conspicuous among those who remained in Costa Rica was Richard Lugo, son of a high-ranking Sandinista Navy officer.

When the former prisoners first arrived at the border, Sandinista Army officers dismissed them as contras. But as they began to tell their stories, it emerged that some, such as Oscar Antonio Centeno Lopez, had been wounded in combat and stuck stubbornly to their Sandinista ideas throughout their imprisonment.

Maj. Adolfo Chamorro, a representative of the Army General Staff, finally told them in a brief speech that the Army was proud of their tenacity and assured them that they had made the right choice in returning to Nicaragua because "the Reagan administration is never going to destroy this revolution." He said the former prisoners would be given time to rest, but those who had been on active duty when they were captured would have to return to their military jobs.

One household that was going to get a happy surprise this morning was the family of returned soldier Javier Solorzano Blanco. When he was captured in June 1985 the Sandinista Army told his family he was dead, contra leaders said. The Army even sent the family a coffin. But the family discovered it was empty. Blanco was among those who returned to Nicaragua last night.

Meanwhile, Sen. Christopher Dodd (D-Conn.) met today with President Daniel Ortega. Dodd is leading a Senate delegation observing efforts to implement the Central American peace plan. Traveling with Dodd were Sens. Terry Sanford (D-N.C.) and John McCain (R-Ariz.).