The bullet-riddled bodies of Rep. Leo J. Ryan (D-Calif.) and four other Americans were recovered from the Guyana jungle yesterday after the congressman's bid to help unwilling members flee a controversial religious sect ended in an ambush by fanatic followers of the cult.

As the surviving members of Ryan's party - at least 10 to them seriously wounded - were evacuated to Georgetown. Guyana's capital, heavily armed Guyanese troops moved cautiously toward the agricultural settlement of the Peoples Temple church amid unconfirmed reports that members of the cult were engaging in mass suicides. Some persons fleeing the settlement contented that 200 to 400 people there had killed themselves.

In Washington, a State Department task force was convened to monitor the macabre drama in a remote corner of Latin American and an Air Force C141 hospital aircraft was dispatched to remove the wounded.

Ryan and other perished in a hail of gunfire Saturday evenings as his party was escorting people seeking to leave the settlement aboard two planes at a nearby airstrip in northwestern Guyana.

The group - consisting of U.S. officials, reporters covering Ryan's expedition, escaping members of the sect and their relatives - was attacked by men from the settlement, firing pistols and automatic weapons from a tractor-drawn flatbed trainer.

When the shooting stopped, some of the terrified escapees from the settlement had fled deep into the surrounding jungle.

In addition to Ryan, those killed were Donald Harris, an NBC television reporter from San Francisco; Robert Brown, an NBC cameraman; Gregory Robinson, a photographer for the San Francisco Examiner, and Patricia Park, one of the community members.

Two American lawyers for the sect - Mark Lane, who has figured in controversies about the assassinations of President John Kennedy and the Rev. Martin Luther King Jr. and Charles Garry, who has represented Black Panthers and other radicals - had remained behind at the settlement. It was not known last night what had happened to them.

The wounded and the others who remained, including this reporter, spent a night of fear and uncertainty at the airstrip and a nearby town until their rescue yesterday by Guyanese troops.

Among those wounded were Richard Dwyer, deputy chief of mission at the U.S. Embassy in Georgetown; Jacqueline Speier, Ryan's legislative assistant; Steven Sung, an NBC sound technician; Ron Javers, a reporter for the San Francisco Chronicle and Tim Reiterman, a reporter for the San Francisco Examiner.

Others listed as wounded were Vernon Gosney, Monica Bagby, Anthony Katsaris, Beverly Oliver, Carol Boye, and Hume Huran. Some were apparently escaping members of the community and relatives of community members.

Six of the wounded were flown out of Guyana on a U.S. Air Force medical plane that was scheduled to arrive at Andrews Air Force Base last night. Others remained behind and the exact number of wounded was not known.

In another of the strange twists that have characterized the grisly story, however, the bodies of the dead could not be removed immediately because of a Guyanese law requiring autopsies on persons killed by violence.

State Department spokesman Tom Reston said last night that the autopsies must be performed to support a prosecution for murder, which "would probably have to be carried out within the territorial jurisdiction of Guyana."

He said an American pathologist flown to Guyana "has remained behind to assist in the investigation."

As of late yesterday, there was considerable confusion and uncertainty about what was happening at the settlement 120 miles northwest of Georgetown. The government of Prime Minister Forbes Burnham made no announcement about whether its forces had entered the settlement or whether it had confirmed the reports of mass suicides there.

Georgetown police did report that the sect's American representative in Georgetown, Sharon Amos, and her three children were found dead yesterday with their throats cut. The police said they were unable to determine immediately whether they had been murdered or were suicide victims.

Reports of violent activities have swirled persistenly around the sect, founded by an American evangelist who calls himself Bishop Jim Jones. Although Jones is white, most of his followers are black. He has described the church as an experiment designed to prove that people of all races, ages and sexes can live together in communal harmony. His theories apparently are based on vaguely Marxist principles.

In the past, Jones' activities centered on the San Francisco area, and the church has an estimated 3,000 adherents in California. In 1973, he came to Guyana to found an agricultural community called Jonestown, and its population since has grown to roughly 1,100 members.

Jones's church has been the target of frequent charges from former members and relatives of adherents that it subjects people to intimidation and violent punishment for failing to observe its rules or for attempting to leave.

It was the persistence of these charges that led Ryan, 53, a San Francisco area congressman, to undertake a 1 1/2-year investigation of the church. He decided to go to Jonestown for a first-hand look at the situation after becoming dissatisfied with State Department attempts to investigation complaints from his constituents about alleged abuses of U.S. citizens at Jonestown, aides to Ryan said yesterday.

In Washington yesterday, State Department spokesman Reston and U.S. officials in Guyana had visited Jonestown periodically for "routine" consular business. He did not elaborate.

Privately, department officials in Washington said that, despite suspicions of abuses, U.S. officials had been unable to do much because of restrictions in Guyanese law and because of their inability to get residents of Jonestown to substantiate complaints about brutality.

These officials said Ryan was briefed about the sect's Guyana activities in late September. They added that department executives, white not trying to dissuade him from his trip, had suggested that the best approach to the problem was in working through the Guyanses courts.

Nevertheless, Ryan decided to go ahead and arrived in Georgetown on Wednesday, accompanied by relatives of persons living in Jonestown and several reporters. With the aid of the U.S. Embassy, he then began a series of protracted negotiations with leaders of the sect, seeking to gain admittance to the settlement - negotiations that resulted in the church's lawyers, Lane and Garry, also coming to Guyana.

On Friday, Ryan and 18 others flew by chartered plane to Port Kaituma, the town with a landing strip closest to Jonestown. Although the distance from the airfield to the settlement is only five miles, the trip on a narrow road through heavy jungle takes 1 1/2 hours.

At Port Kaituma, the party was met by representatives of the sect. Following further negotiations, during which Lane and Gary argued that Ryan should be allowed to visit Jonestown, the group was admitted to the settlement.

In the settlement - a collection of rough but clean, communal log buildings - the party was given dinner and entertained by a soul music combo.

Most people in the settlement nervously moved away whenever one of the visitors came close, and those attempting to leave said later everyone had been told that the outsiders were there to kill them. Each time a member of Ryan's party tried to wander around alone, one of the sect leaders would attach himself to the visitor and inhibit his movements.

Nevertheless, Ryan, who spent the night in Jonestown while most of the others were transported back to Port Kaituma to sleep, did interview a number of residents. By Saturday, approximately 15 had told him they wanted to leave and return to the United States.

As the group was preparing to leave on Saturday, an angry dispute broke out between a man who wanted to leave with his three children and his wife who insisted on staying. While attempts were being made to mediate between them, a man suddenly rushed up behind Ryan, grabbed him around the neck and tried to put a knife to his throat.

Ryan ducked, and Lane seized the assailant. In the ensuing scuffle, the man was cut by his own knife, and his blood splattered all over Ryan's clothes. After that, it was agreed that the party should leave immediately while Land and Gary stayed behind to talk with the quarrelling husband and wife.

The rest of the group then went to the airstrip and began boarding two waiting chartered places, one with 19 seats and one with five. In accordance with a promise by Ryan, those seeking to leave boarded the planes first.

Suddenly, one of the settlement residents aboard the smaller plane, Larry Layton, pulled a pistol and began firing at the other passengers, wounding Gosney and Bagby.

His pistol then jammed, and the from him and fled the plane. Guyanese officials said last night that Layton had been arrested yesterday in the vicinity of Jonestown.

At the same time, three men from the settlement began moving toward the planes, followed by the tractor-driven trailer. Persons from the settlement identified the three as Tom Kice, Albert Touchette and Joe Wilson, and the tractor driver as Stanley Gieg.

As they approached, the three men suddenly leaped up on the trailer, picked up guns and began shooting at the larger plane and those standing around it. Some, including Ryan, were hit immediately, and the others began scrambling under the plane or running to a nearby shed or into the jungle.

A detachment of four Guyanese soldiers was nearby, but they made no effort to intervene. Later, the soldiers told survivors that they considered the incident a fight between foreigners and did not want to get involved.

With the soldiers and other Guyanese looking on, the tractor-trailer drove slowly around the larger plane as the men shot into it and at the people on the ground. They appeared to take special pains to put coup degrace shots into Ryan and Brown, the TV cameraman, and Robinson, the newspaper photographer, apparently.

Then, the tractor-trailer drove off. people from the settlement who survived the attack contended afterward that the reason everyone was not killed was because the trio of assailants were not good shots. They said the settlement's basketball team had been trained carefully in markmanship, but was away for a game in Georgetown at the time of the attack.

The embassy official, Dwyer, although wounded in the leg, assumed unofficial command of the survivors, and several later praised him as the "hero" of the ensuring hours.

Before anyone could prevent it, the crew of the larger plane, which had been disabled by gunfire, scrambled aboard the smaller one, and flew to Georgetown. It carried Monica Bagby, who had been lying injured on the floor, but left everyone else stranded.

Dwyer rounded up most of the dazed survivors and, after some argument, arranged for the badly wounded to be put in the tent of the Guyanese troop detachment. The others spent the night on the floor of a bar in Port Kaituma.

Although townspeople posted a guard outside, the survivors spent the night in terror that their attackers might return. Dwyer managed to get a radio message out and received assurances that soldiers would arrive during the night.

The air strip had no lights for night landings, and the first troops, who came by rail, did not reach the scene until shortly after dawn yesterday. It was not until midmorning that two planes arrived to bring other troops and to evacuate the survivors.

Later in the day, the government of Prime Minister Forbes Burnham issued a statement expressing "deep regret" over "the most unfortunate incident." The statement noted that "the U.S. congressman and his party were victims of an attack by Americans" and added: "There were no Guyanese involved." CAPTION: Picture 1, Rep. Leo J. Ryan, right, consults with his aides, Jackies Speier and James Schollart, during their flight to Guyana, Copyright (c) 1978, The San Francisco Examiner; Picture 2, Photo from People Temples pamplet shows boy working in Guyana Camp; Picture 3, Greg Robinson, left, Steven Sung, center, and Bob Brown chat with children in Georgetown before visit to Port Kaituma where all three newsmen were killed, Copyright (c) 1978, The San Francisco Examiner; Picture 4, Film taken by Bob Brown minutes before attack shows Don Harris, left, and Gregory Robinson, right, AP; Map, no caption, By Milton Clipper - The Washington Post