Nicaragua announced tonight that eight West German civilians who were captured by U.S.-backed rebel forces last month have been released.

A brief statement on Sandinista-run television confirmed that the eight -- four men and four women -- had been freed near the town of Rama, about 150 miles east of Managua. The statement said that 15 Nicaraguans were also released.

Officials at the West German Embassy were not available for comment tonight.

In Tegucigalpa, Honduras, Frank Arana, a spokesman for the rebels' Nicaraguan Democratic Force, known as counterrevolutionaries or contras, told The Associated Press that the eight "were released safe and sound and in a perfect state of health."

Arana said they were freed by a contra patrol to representatives of the West German government at an evangelical church in the hamlet of Presillitas, adding that there was no interference from the Sandinista military. He said the Germans were en route by car to Managua.

"Our patrols did not encounter any problems of any nature in entering or leaving. The entire operation was a success and in an environment of tranquility," the AP quoted Arana as saying.

Arana said the release came about as a result of secret negotiations in Managua and Tegucigalpa between rebel leaders and West German officials.

The announcement came as negotiations to free the captives had appeared bogged down. President Daniel Ortega had warned that the rebels should free their captives by 6 p.m. today local time.

The prisoners were freed shortly after the deadline expired, according to a radio report.

Ortega said on Sunday that the Nicaraguan Army might resort to force to rescue the West Germans if they were not freed by the original deadline of 6 p.m. Monday.

He extended the deadline for 24 hours following pleas from West German government officials not to do anything that might endanger the lives of the captives.

The eight are among several hundred West German volunteers who work in Nicaragua on a variety of development projects. Their work is not sponsored by the West German government.

Other West German volunteers had held protests in Managua while the eight were in captivity. In one demonstration, several tied themselves to the gates of the U.S. Embassy.

The eight were seized during an attack in southeast Nicaragua on May 17. A high-level delegation led by Hans-Juergen Wischnewski, a leader of West Germany's opposition Social Democratic Party, has been in Managua to negotiate conditions for their release.

The negotiations were complicated when the Sandinistas refused to accept conditions that the contras had suggested, including an arrangement under which government forces would be withdrawn from the area where the release was to take place, a diplomatic source said.

Last week a helicopter left Managua in what was to have been a mission to pick up the captives. But for reasons still in dispute, the operation was unsuccessful.

Wischnewski had gone to a planned handover point in the remote jungle area, but Nicaragua said the Germans were not found at the agreed place. The rebels said they could not hand over their prisoners because they had been attacked by the Sandinista Army.