Five persons are known to have been killed Saturday in an attack on a group investigating a religious settlement near Port Kaituma, Guyana. They included a California congressman, two members of a National Broadcasting Co. television news crew, and a photographer for the San Francisco Examiner newspaper.

The identify of the fifth victim, believed to have been a member of the People's Temple religious community who was seeking to leave with the fact-finders, was not immediately known.

Rep. Leo J. Ryan, 53, a California Democrat who entered Congress in 1973 and who was elected to his fourth term from San Mateo County near San Francisco earlier this month, had a reputation for first-hand investigation.

On Nov. 13, when he left for Guyana to investigate the People's Temple religious group, he said he was making the trip "in response to constituents' requests." He was killed in Guyana on Saturday.

The People's Temple had been active in the San Francisco area. It moved to Guyana, on the northeast coast of South America, about a year ago and was headed by Jim Jones, a former San Francisco city official.

"He knew there was danger down there, but he went anyhow," said Joel Holsinger, an aide to the congressman. "He felt that his job was to inspect things personally."

In 1970, Mr. Ryan spent eight days living as an immate at Folsom Prison to learn about conditions there. He was a member of the California State Assembly at the time. In 1966, following the riots in the Watts area of Los Angeles, he worked as a high school teacher in the neighborhood.

In 1966, he also made a trip to Newfoundland at the invitation of the Greenpeace Foundation to investigate the hunting of harp seal pups. His opposition to the hunting earned him the International Wildlife Foundation's "Man of the Year" award.

In Congress, Mr. Ryan was a member of the House government operations, international relations and Post Office and civil service committees.

His congressional district includes Hillsborough, the family home of Patricia Hearst.

Two months ago, after meeting the imprisioned heiress at the federal penetentiary in Pleasanton, Calif., he wrote a letter to Atty. Gen. Griffin Bell urging that her sentence be commuted. The letter was signed by 48 congressmen.

Mr. Ryan was born in Lincoln, Neb. He served in the Navy during World War II and then attended Creighton University in Omaha, from which he graduated in 1951. He was a teacher and school administrator in Nebraska and then taught at a high school in San Bruno, near San Francisco.

He began his political career as a member of the City Council of South San Francisco, an industrial community. He also served as its mayor before being elected to the California State Assembly in 1962. He remained in the assembly until he went to Congress.

Mr Ryan, who was divorced twice, is survived by five children. CAPTION: Picture, no caption, Copyright (c) 1978, The San Francisco Examiner