As the sun was setting over the picturesque outlines of this well-preserved European capital on a recent Friday evening, a small group of mostly aging figures trudged into a low-built gothic structure near the banks of the Vltava River: the Altneuschul, Europe's longest-standing synagogue.

A plump, round-faced young man led the congregation in prayer, still feeling his way among his elders as their religious leader. Carrying out a tradition of Jewish worship that has lasted in Prague for more than a millenium, Daniel Mayer, the city's new rabbi, has given the dwindling Jewish community here new hope of survival after 15 years without a spiritual leader.

For a communist government committed to watching religions die out, the Prague government takes exceptional pride in its Jewish enclave. An extensive exhibition of Jewish culture, assembled from the vast holdings of Czechoslovakia's state-run Jewish museum with the help of Smithsonian researchers, is now touring the United States.

Paradoxically, the Nazis, who caused the near extinction of Eastern Europe's Jews, are responsible for amassing Prague's Jewish treasures by meticulously collecting and storing the valuables of those sent to extermination camps.

As many as 700,000 tourists each year visit the remains of Prague's old Jewish quarter -- its famous cemetery with the crowded, ornamental gravestones, its baroque town hall with the backward-running clock, its grand synagogues, most of which are now museums.

"Why does the government give millions of Czech crowns to maintain these buildings?" asked Desider Galsky, president of the Czech Council of Jewish Communities, anticipating a reporter's question. "You can say it's to attract tourists, but there's something else.

"For Czechs, the history of the Jews is a part of the history of the people. Prague's cultural life was combined with its Jewish life for centuries."

Nonetheless, it is not easy being a Jew in Czechoslovakia today. Community representatives would rather not discuss the problems, saying only that difficulties Jewish believers face are no greater than those for Christians in this atheistic state. Some Jews believe they are watched by the police, and when they stray beyond certain limits, they are quickly admonished.

Such was the case several years ago, for instance, when the Jewish playwright, Karol Sidon, staged a performance for the Jewish festival of Purim. The show attracted some gentiles, members of Prague's dissident community. Communist authorities, who have kept a tight reign on artistic productions since the 1968 Soviet invasion, let Jewish officials know afterward that this kind of activity was not acceptable.

In general, say some Prague Jews, religious activities are not permitted to range beyond symbolic limits. The Jewish elders steer away from controversy and advertise special events only in the community's publications, whose circulation is very small.

The government finances the country's Jewish communities, helping to pay basic utility costs. Extra funds for staff salaries and assistance to needy Jews comes from America's Jewish Joint Distribution Committee, which donates about $8,000 annually to Czechoslovakia.

Before World War II, more than 100,000 Jews lived in Czechoslovakia. By official count, the Nazis killed 77,297 of them. Their names are inscribed on the walls of Prague's Pinkas Synagogue.

Many Jews who survived the war left Czechoslovakia in the late 1940s for Israel and western countries. A second wave of postwar emigration took place in 1968 and 1969 after the 1967 Middle East war prompted communist states to sever ties with Israel and gave rise to renewed anti-Semitic propaganda in parts of Eastern Europe.

Today, 6,000 people are registered with Czechoslovakia's 16 Jewish communities, but Jewish authorities estimate that at least twice that many Jews still reside in the country.

Kosher restaurants exist in Prague and Bratislava as well as in Kosice, where the only other rabbi in Czechoslovakia is based. Prague remains the most active religious community, publishing a monthly Jewish journal and a quarterly bulletin in German and English.

There are strains between some of the younger Jews and older community authorities who are sometimes seen as restraining the observance of Jewish rites and being too conciliatory toward the state.

"The Jewish community is not a monolith here," acknowledged Galsky, the Jewish council president. "But it isn't anywhere in the world. The youth, ironically, tend to be more orthodox than some of us are. But to divide this small community into more groups would be crazy and foolish. The problem is to find ways of keeping contacts with everyone."

When Mayer was first asked to be the new rabbi, he hesitated. The last one had died in 1970 at age 95, and Mayer was aware of the challenge involved in maintaining the community. Another young man who had agreed to take over had gone off to London for rabbinical study but decided to stay in the West.

"Initially, I wanted to study history, but it was clear the Jewish community needed someone," Mayer said in an interview, as his father, a retired accountant, looked on. "I considered the situation here and decided to help."

The closest rabbinical school was in Budapest; in fact, it is the only rabbinical school left in Eastern Europe. So Mayer left for 6 1/2 years of training. He knew only a few words of Hungarian, but was able to speak to professors in Hebrew. At the time of his graduation last year, there were eight students at the school -- two from the Soviet Union, one from East Germany, four from Hungary and Mayer.

Installed in June with grand ceremony, Mayer conducts weekly services at both the all-stone, seven-century-old Altneuschul and the turn-of-the-century Jerusalem Street Synagogue, the only functioning synagogues in Prague. He is to be married later this month.

"It requires more than courage to be a rabbi here," said Mayer, 27. "It takes diplomacy and tact to deal with some older members of the congregation."

In the last 15 years, only four young Jews have celebrated the rite of bar mitzvah, which formally marks the passage of a boy to manhood. A sprinkling of men under the age of 35 can be seen at Friday night services. Officials say about 100 young people and their families attend the major festivals of Hanukkah and Purim. The small numbers suggest a disappearing population.

Asked if the Jewish community in Czechoslovakia is dying out, Galsky observed that Jewish communities in the West as well are having problems.

"In the United States, you have 40 percent mixed marriages, a lot of assimilation," he said. "We're happy we have this community. But what will be in 30 years, I don't know."